题海
让大学四年没有难题
首页
搜题
登陆
题目详情
单选题
类和对象之间是 的关系
A.
多对一
B.
一对多
C.
一对一
D.
多对多
查看答案
学科:
编程设计与开发
时间:
2024-03-07 01:42:16
相关题目
相关作业
题目1
单选题
类和对象之间是 的关系
A. 多对一
B. 一对多
C. 一对一
D. 多对多
题目2
单选题
下列方法定义中,正确的是
A. void x( int a, b ) { return a-b; }
B. int x( int a,int b) { return a+b; }
C. double x { return b; }
D. x( int a,int b) { return a-b; }
题目3
单选题
下列方法定义中,方法头不正确的是
A. public static x( double a ){ ... }
B. public int x( ){ ... }
C. public static int x( double y ){ ... }
D. void x( double d ) { ... }
题目4
单选题
设 A为已定义的类名,下列声明A类的对象a的语句中正确的是
A. A a=A( )
B. A a=new class( )
C. a A
D. A a=new A( )
题目5
单选题
有一个类A,以下为其构造方法的声明,其中正确的是
A. A(int x){...}
B. a(int x){...}
C. void A(int x){...}
D. void a(int x){...}
题目6
单选题
Java语言中创建一个对象使用的关键字为
A. create
B. new
C. interface
D. class
题目7
单选题
现有: class Passer { static final int X = 5; public static void main(String[] args) { new Passer().go(X); System.out.print(X); } void go(int x) { System.out.print(x++); } } 结果是什么
A. 65
B. 55
C. 66
D. 56
题目8
单选题
现有: 1. class Top { 2. static int x = 1; 3. public Top(int y) { x *= 3; } 4. } 5. public class Middle extends Top { 6. public Middle() { x += 1; } 7. public static void main(String[] args) { 8. Middle m = new Middle(); 9. System.out.println(x); 10. } 11. } 结果为
A. 编译失败
B. 1
C. 3
D. 2
题目9
单选题
现有: 1. class Passer { 2. static final int X=5; 3. public static void main (String [] args) { 4. new Passer().go (X); 5. System. out .print(X); 6. } 7. void go (int x) { 8. System. out .print(x++); 9. } 10. } 结果是什么
A. 66
B. 65
C. 55
D. 56
题目10
单选题
现有: class Wrench { public static void main(String[] args) { Wrench w = new Wrench(); Wrench w2 = new Wrench(); w2 = go(w, w2); System.out.print(w2 == w); } static Wrench go(Wrench wrl, Wrench wr2) { Wrench wr3 = wrl; wrl = wr2; wr2 = wr3; return wr3; } } 结果是什么
A. false
B. 运行的时候有异常抛出
C. 编译失败
D. true
下载
题海APP
拍照搜题更快捷
海量题库
无搜索限制
快捷拍照搜题
扫描他!然后带走我~