如何在PHP中自定义一个类PERSON
A: function PERSON { //...... }
B: function PERSON (){ //...... }
C: class PERSON{ //...... }
D: class PERSON(){ //...... }
A: function PERSON { //...... }
B: function PERSON (){ //...... }
C: class PERSON{ //...... }
D: class PERSON(){ //...... }
举一反三
- 定义一个类Person,不想让其他类继承该类Person,下列书写正确的是( ) A: private class Person{… …} B: protected class Person{… …} C: public final class Person{… …} D: class Person{… …}
- 下列选项中,与class Person等价的是( )。知识点:继承 A: class Person(Object) B: class Person(object) C: class Person: Object D: class Person: object
- python中,下列哪种语法表示Student从Person中继承。( ) A: class Student: Person B: class Student extends Person C: class Student (Person) D: class Student: class Person
- 下列JavaScript定义对象的语句中,()不正确。 A: var person = {}; B: var person = new Object(); C: person =name; D: function person(name,sex){} var personObj = new person();
- 【多选题】定义了如下Person类,下面()程序段能够正确初始化Person数组。 class Person{ private String name; public Person(String name){ this.name=name; } } A. Person [ ] list=new Person[ ]{new Person("孙悟空"),new Person("猪八戒")}; B. Person list[ ]=new Person[ ]{new Person("孙悟空"),new Person("猪八戒")}; C. Person[ ] list={new Person("孙悟空"),new Person("猪八戒")}; D. Person list=new Person[ ]{new Person("孙悟空"),new Person("猪八戒")};