网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
若有下面的类定义classBridge{Roadroad;}classRoad{Stringname;}它表示()
A
“是什么”关系
B
“有什么”关系
C
二者都是
D
二者皆不是
参考答案
参考解析
解析:
暂无解析
更多 “单选题若有下面的类定义classBridge{Roadroad;}classRoad{Stringname;}它表示()A “是什么”关系B “有什么”关系C 二者都是D 二者皆不是” 相关考题
考题
若有定义int a[9],+P=a;,则P+5表示( )。A.数组元素a[5]的值B.数组元素a[5]的地址SXB
若有定义int a[9],+P=a;,则P+5表示( )。A.数组元素a[5]的值B.数组元素a[5]的地址C.数组元素a[6]的地址D.数组元素a[0]的值加上5
考题
WhichHttpSessionmethodstoresanobjectinasession?()
A.put(Stringname.Objectvalue)B.set(Stringname.Objectvalue)C.setAttribute(Stringname.Objectvalue)D.putAttribute(Stringname.Objectvalue)E.addAttribute(Stringname.Objectvalue)
考题
类Teacher:classTeacher{Stringname;floatsalary;Teacher(Stringname){this.name=name;}Teacher(Stringname,floatsalary){this.name=name;this.salary=salary;}}执行语句Teachert=newTeacher(Tom”,2000.0f);后,字段salary的值是哪一项?()A.2000.0fB.0.0fC.null;D.2000
考题
设有下面两个类的定义:classperson{longid;//身份证号stringname;//姓名}classstudentextendsperson{intscore;//入学总分intgetscore(){returnscore;}}则类person和类student的关系是_________。
A.关联关系B.上述类定义有语法错误C.继承关系D.包含关系
考题
Whichgetsthenameoftheparentdirectoryfile“file.txt”?()
A.Stringname=File.getParentName(“file.txt”);B.Stringname=(newFile(“file.txt”)).getParent();C.Stringname=(newFile(“file.txt”)).getParentName();D.Stringname=(newFile(“file.txt”)).getParentFile();E.Directorydir=(newFile(“file.txt”)).getParentDir();Stringname=dir.getName();
考题
设变量a、b、c、d和y都已正确定义并赋值。若有以下if语句: 该语句所表示的含义是( )。 A. SXB
设变量a、b、c、d和y都已正确定义并赋值。若有以下if语句:该语句所表示的含义是( )。A.B.C.D.
考题
设有下列两个类的定义,则类Person和类Man的关系是 ( ) class Person{ long id;//身份证号 Stringname;//姓名 } class Man extends Person{ int age;//年龄 int getScore(){ return score; } }A.包含关系B.继承关系C.关联关系D.无关系,上述类定义有语法错误
考题
设有如下的用户定义类型:Type Studentnumber As Stringname As Stringage As IntegerEnd Type则以下正确引用该类型成员的代码是( )。A.B.C.D.
考题
若有定义“intb[8],*p=b;”,则p+6表示( )。A.数组元素b[6]的值B.数组元素b[6]的地址SX
若有定义“intb[8],*p=b;”,则p+6表示( )。A.数组元素b[6]的值B.数组元素b[6]的地址C.数组元素b[7]的地址D.数组元素b[0]的值加上6
考题
下列类Account的构造方法中,声明正确的是?()A、Account(Stringname){)B、Account(Stringname)C、Account(name)()D、NewAccount(Stringname){)
考题
下列关于类之间关系的描述,错误的是()A、用有向无环图(DAG)表示的类之间关系,称为“类格”B、DAG中每一个结点是一个类定义,它的前驱结点称为基类C、DAG中每一个结点是一个类定义,它的后继结点称为派生类D、DAG中每一个结点是一个类定义,它有且仅有一个前驱结点
考题
单选题下列类Account的构造方法中,声明正确的是?()A
Account(Stringname){)B
Account(Stringname)C
Account(name)()D
NewAccount(Stringname){)
考题
单选题声明方法时〃如果有参数〃则必须写在方法名后面的小括号内〃并且必须指明它的类型和名称〃若有多个参数〃需要用()隔开。A
逗号B
分号C
冒号D
不能定义多个参数
热门标签
最新试卷