Which is true?()
A: if line 10 is removed, the compilation succeeds.
B: if line 11 is removed, the compilation succeeds.
C: if line 12 is removed, the compilation succeeds.
D: if line 13 is removed, the compilation succeeds.
E: More than one line must be removed for compilation to succeed.
A: if line 10 is removed, the compilation succeeds.
B: if line 11 is removed, the compilation succeeds.
C: if line 12 is removed, the compilation succeeds.
D: if line 13 is removed, the compilation succeeds.
E: More than one line must be removed for compilation to succeed.
举一反三
- Which statement is true?() A: Compilation succeeds. B: class A does not compile. C: The method declared on line 9 cannot be modified to throw TestException. D: TestA compiles if line 10 is enclosed in try/catch block that catches TestException.
- If a President dies or resigns or is removed from office, the succeeds him.
- They<br/>haven't finished the talk when the telephone line was ((_off)). A: disconnected B: surrounded C: isolated D: removed
- Given the following code: 1) public void modify() { 2) int i, j, k; 3) i = 100; 4) while ( i > 0 ) { 5) j = i * 2; 6) System.out.println (" The value of j is " + j ); 7) k = k + 1; 8) i--; 9) } 10) } Which line might cause an error during compilation?() A: line 4 B: line 6 C: line 7 D: line 8
- Given: Which statement is true?() A: The equals method does NOT properly override the Object.equals method. B: Compilation fails because the private attribute p.name cannot be accessed in line 5. C: To work correctly with hash-based data structures,this class must also implement the hashCodemethod. D: When adding Person objects to a java.util.Set collection,the equals method in line 4 will preventduplicates.