What is the result?()
A、 Compilation fails.
B、 aAaA aAa AAaa AaA
C、 AAaa AaA aAa aAaA
D、 AaA AAaa aAaA aAa
E、 aAa AaA aAaA AAaa
F、 An exception is thrown at runtime.
相关问题推荐
-
public class X { public static void main (String[]args) { String s1 = new String (“true”); Boolean b1 = new Boolean (true); if (s2.equals(b1)) { System.out.printIn(“Equal”); } } } What is the result?()
A、 The program runs and prints nothing.
B、 The program runs and prints “Equal”
C、 An error at line 5 causes compilation to fail.
D、 The program runs but aborts with an exception.
-
10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()
AFoo.beta() is a valid invocation of beta().
BFoo.alpha() is a valid invocation of alpha().
CMethod beta() can directly call method alpha().
DMethod alpha() can directly call method beta().
-
Which statements about inheritance are true?()
AIn Java programming language only allows single inheritance.
BIn Java programming language allows a class to implement only one interface.
CIn Java programming language a class cannot extend a class and implement a interface together.
DIn Java programming language single inheritance makes code more reliable.
-
package test1; public class Test1 { static int x = 42; } package test2; public class Test2 extends test1.Test1 { public static void main(String[] args) { System.out.println(“x = “ + x); } } What is the result?()
A、 x = 0
B、 x = 42
C、 Compilation fails because of an error in line 2 of class Test2.
D、 Compilation fails because of an error in line 3 of class Test1.
E、 Compilation fails because of an error in line 4 of class Test2.
-
You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?()
A、 public
B、 private
C、 protected
D、 transient
E、 default access