A final method in class X can be abstract if and only if X is abstract.
A protected method in class X can be overridden by any subclass of X.
A private static method can be called only within other static methods in class X.
A non-static public final method in class X can be overridden in any subclass of X.
A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
A method with the same signature as a private final method in class X can be implemented in a subclass of X.
A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.
第1题:
package foo; public class Outer { public static class Inner { } } Which statement is true?()
第2题:
Which two of statements are true?()
第3题:
10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()
第4题:
It is desirable that a certain method within a certain class can only be accessed by classes that are defined within the same package as the class of the method. How can such restrictions be enforced?()
第5题:
package foo; public class Outer ( public static class Inner ( ) ) Which statement is true? ()
第6题:
public class SyncTest { private int x; private int y; private synchronized void setX( int i ) { x = i; } private synchronized void setY( int i ) { y = i; } public void setXY( int i ) { setX(i); setY(i); } public synchronized boolean check() { return x != y; } } Under which condition will check return true when called from a different class? ()
第7题:
public class SyncTest ( private int x; private int y; private synchronized void setX (int i) (x=1;) private synchronized void setY (int i) (y=1;) public void setXY(int 1)(set X(i); setY(i);) public synchronized Boolean check() (return x !=y;) ) Under which conditions will check () return true when called from a different class?
第8题:
Which two statements are true?()
第9题:
Which the following two statements are true?()
第10题:
Which statement is true?()