当前分类: SCJP程序员认证考试
问题:You want a class to have access to members of another class ...
查看答案
问题:单选题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...
问题:多选题Which of these are keywords in Java?()AdefaultBNULLCStringDthrowsElong...
问题:11. public static void test(String str) { 12. if(str == nul...
问题:Which two CANNOT directly cause a thread to stop executing? ...
问题:单选题public class SwitchTest { public static void main (String args) { System.out.PrintIn(“value =” +switchIt(4)); } public static int switchIt(int x) { int j = 1; switch (x) { case 1: j++; case 2: j++; case 3: j++; case 4: j++; case 5:...
问题:单选题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...
问题:public class Score implements Comparable { private int wins...
问题:Which statement is true for the class java.util.ArrayList?()...
问题:多选题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 of the following statements are legal?() ...
问题:多选题Which two statements are reserved words in Java?()ARunBImportCDefaultDImplement...
问题: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...
问题:Which statements concerning the effect of the statement gfx....
问题:Which will declare a method that is available to all members...
问题:单选题Which statement of assigning a long type variable to a hexadecimal value is correct?()A long number = 345L;B long number = 0345;C long number = 0345L;D long number = 0x345L;...
问题:单选题import java.io.IOException; public class ExceptionTest( public static void main (Stringargs) try ( methodA(); ) catch (IOException e) ( system.out.printIn(“Caught IOException”); ) catch (Exception e) ( system.out.printIn(“Caught Exception...
问题:单选题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...
问题:Which method is an appropriate way to determine the cosine o...