当前分类: SCJP程序员认证考试
问题:单选题An object is()A what classes are instantiated from.B an instance of a class.C a blueprint for creating concrete realization of abstractions.D a reference to an attribute.E a variable....
查看答案
问题:int i = 0; while (true) { if(i==4) { break; } ++i; } S...
问题:Which will declare a method that is available to all members...
问题:单选题1. public class test ( 2. public static void main(string args[]) { 3. int 1= 0; 4. while (i) { 5. if (i==4) { 6. break; 7. } 8. ++i; 9. } 10. 11. } 12. ) What is the value of i at line 10?()A 0B 3C 4D 5E The code will not compile....
问题:Which of these are keywords in Java?() ...
问题:16. Date d = new Date(0L); 17. String ds = “December 15, 20...
问题:Which expressions are correct to declare an array of 10 Stri...
问题:单选题Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?() class A {} class B extends A {} class C extends A {} public class Q3ae4 { public static void...
问题:单选题1. public class ForBar { 2. public static void main(String []args) { 3. int i = 0, j = 5; 4. tp: for (;;) { 5. i ++; 6. for(;;) 7. if(i --j) break tp; 8. } 9. system.out.printIn(“i = ” + i + “, j = “+ j); 10. } 11. } What is the resu...
问题:单选题Which gets the name of the parent directory file “file.txt”?()A String name= File.getParentName(“file.txt”);B String name= (new File(“file.txt”)).getParent();C String name = (new File(“file.txt”)).getParentName();D String name= (new File(“file.txt”...
问题:单选题interface foo { int k = 0; } public class test implements Foo ( public static void main(String args) ( int i; Test test = new test (); i= test.k; i= Test.k; i= Foo.k; ) ) What is the result? ()A Compilation succeeds.B An err...
问题:多选题11. public interface Status { 12. /* insert code here */ int MY_VALUE = 10; 13. } Which three are valid on line 12?()AfinalBstaticCnativeDpublicEprivateFabstractGprotected...
问题:public class X implements Runnable( private int x; priv...
问题:填空题3. string foo = “ABCDE”; 4. foo.substring(3); 5. foo.concat(“XYZ”); 6. Type the value of foo at line 6.()...
问题:public class Test { public static void main(String [] args)...
问题:单选题public class X { public object m () { object o = new float (3.14F); object oa = new object [1]; oa[0]= o; o = null; oa[0] = null; return o; } } When is the float object created in line 3, eligible for garbage collection?()A Just af...
问题:Which statement of assigning a long type variable to a hexad...
问题:单选题public class Person { private name; public Person(String name) { this.name = name; } public int hashCode() { return 420; } } Which is true?()A The time to find the value from HashMap with a Person key depends on the size of the map.B Deletin...
问题:public class X { public static void main(String [] args) { ...
问题:单选题A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this?()A put Poker.jar in directory /st...