Given: What is the result?()
A. An exception is thrown at runtime. B. int Long C. Compilation fails. D. Short Long
单项选择题Given: Which statement is true?()
A. The cardID and limit variables break polymorphism. B. The code demonstrates polymorphism. C. The ownerName variable breaks encapsulation. D. The setCardInformation method breaks encapsulation. E. The class is fully encapsulated.
单项选择题Click the Exhibit button. Given this code from Class B: 25. A a1 = new A(); 26. A a2 = new A(); 27. A a3 = new A(); 28. System.out.println(A.getInstanceCount()); What is the result?()
A. Compilation of class A fails. B. Line 28 prints the value 3 to System.out. C. Line 28 prints the value 1 to System.out. D. Compilation fails because of an error on line 28. E. A runtime error occurs when line 25 executes.
多项选择题Which two code fragments correctly create and initialize a static array of int elements?()
A.A B.B C.C D.D
多项选择题Given: 10. class One { 11. void foo() { } 12. } 13. class Two extends One { 14. insert method here 15. } Which three methods, inserted individually at line 14, will correctly complete class Two?()
A. public void foo() { /* more code here */ } B. private void foo() { /* more code here */ } C. protected void foo() { /* more code here */ } D. int foo() { /* more code here */ } E. void foo() { /* more code here */ }