当前分类: SCJP程序员认证考试
问题:public class Threads2 implements Runnable { public void nun...
查看答案
问题:多选题public class MethodOver { public void setVar (int a, int b, float c) { } } Which two overload the setVar method?()APrivate void setVar (int a, float c, int b) {}BProtected void setVar (int a, int b, float c) {}CPublic int setVar (int a, float c...
问题:单选题public class X { public static void main (String args) { byte b = 127; byte c = 126; byte d = b + c; } } Which statement is true?()A Compilation succeeds and d takes the value 253.B Line 5 contains an error that prevents compilation.C ...
问题:public interface Foo { int k = 4; 3. } Which three are equ...
问题:Which of the following statements are legal?() ...
问题:Which statement is true for the class java.util.ArrayList?()...
问题:单选题What will be written to the standard output when the following program is run?() public class Q63e3 { public static void main(String args[]) { System.out.println(9 ^ 2); } }A 81B 7C 11D 0E false...
问题:多选题class A { } class Alpha { private A myA = new A(); void dolt( A a ) { a = null; } void tryIt() { dolt( myA ); } } Which two statements are correct?()AThere are no instanced of A that will become eligible for garbage collection.BExplicitly se...
问题:多选题Which two statements are reserved words in Java?()ARunBImportCDefaultDImplement...
问题:单选题class Base { Base() { System.out.print(“Base”); } } public class Alpha extends Base { public static void main( String[] args ) { new Alpha(); new Base(); } } What is the result?()A BaseB BaseBaseC Compilation fails.D The code runs with no ...
问题:单选题public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()A The program runs and print...
问题:11. public enum Title { 12. MR(”Mr.”), MRS(”Mrs.”), MS(”Ms....
问题:单选题public class Foo { public void main( String[] args ) { System.out.println( “Hello” + args[0] ); } } What is the result if this code is executed with the command line?()A HelloB Hello FooC Hello worldD Compilation fails.E The code does not ru...
问题:单选题Given: 310-025 Leading the way in IT testing and certification tools, www.testking.com - 48 - public class foo { static String s; public static void main (Stringargs) { system.out.printIn (“s=” + s); } } What is the result?()A The c...
问题:单选题public class test( public int aMethod()[ static int i=0; i++; return I; ) public static void main (String args){ test test = new test(); test.aMethod(); int j = test.aMethod(); System.out.printIn(j); ] } What is the result?(...
问题:多选题Which two declarations prevent the overriding of a method?()AFinal void methoda() {}BVoid final methoda() {}CStatic void methoda() {}DStatic final void methoda() {}EFinal abstract void methoda() {}...
问题:多选题Choose the three valid identifiers from those listed below.()AI Do Like The Long Name ClassB$byteCconstD_okE3_case...
问题:Which method is an appropriate way to determine the cosine o...
问题:单选题How can you create a listener class that receives events when the mouse is moved?()A By extending MouseListener.B By implementing MouseListener.C By extending MouseMotionListener.D By implementing MouseMotionListener.E Either by extending MouseMot...
问题:单选题What does the value returned by the method getID() found in class java.awt.AWTEvent uniquely identify?()A The particular event instance.B The source of the event.C The set of events that were triggered by the same action.D The type of event.E The type ...