题目内容

Java类封装了(表明对象的状态)、(表明对象所具有的行为)、(Constructor)、(Inner Class)、静态/非静态 。(中文回答)

查看答案
更多问题

修饰的成员变量或方法的可见范围为当前类。没有权限修饰符时的成员变量或方法的可见范围为。修饰的成员变量或方法的可见范围为当前包及该类的子类。public修饰的成员变量或方法可以被所有包中所有类中的方法访问。

What is the result?

A. x = 0
B. x = 1
C. x = 2
D. x = 3
E. x = 4
F. Compilation fails

In which two cases does the compiler supply a default constructor for class A? (Choose two.)

A. class A {}
B. class A {public A() {}}
C. class A {public A(int x) {}}
D. class A{void A(){}}

Which two allow the class Thing to be instantiated using new Thing()? (Choose two.)

A. public class Thing {}
B. class Thing {public Thing(){}}
C. public class Thing{public Thing(void){}}
D. public class Thing{public Thing(String s){}}
E. public class Thing{public void Thing(){}public Thing(String s){}}

答案查题题库