当前分类: SCJP程序员认证考试
问题:public class ClassA { public int getValue() { int value=0;...
查看答案
问题:5. String foo = “base”; 6. foo.substring(0,3); 7. foo.co...
问题:单选题Which method is an appropriate way to determine the cosine of 42 degrees?()A Double d = Math.cos(42);B Double d = Math.cosine(42);C Double d = Math.cos(Math.toRadians(42));D Double d = Math.cos(Math.toDegrees(42));E Double d = Math.cosine(Math.toR...
问题:Which statements concerning the methods notify() and notifyA...
问题:多选题Which two CANNOT directly cause a thread to stop executing?()ACalling the yield method.BCalling the wait method on an object.CCalling the notify method on an object.DCalling the notifyAll method on an object.ECalling the start method on another Thread ...
问题:public class Ball { public enum Color { RED, GREEN, BLUE };...
问题:多选题Which two valid declarations of a char?()AChar ch = “a”;BChar ch = ‘/’ ‘;CChar ch = ‘cafe’;DChar ch = “cafe”;EChar ch = ‘/ucafe’;FChar ch = ‘/u10100’;GChar ch = (char) true;...
问题:单选题public class X implements Runnable ( private int x; private int y; public static void main(String [] args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; ...
问题:1) class Person { 2) public void printValue(int i, int j) {/...
问题:10. interface A { void x(); } 11. class B implements A { pu...
问题:Which two valid declarations of a char? ()...
问题:int I=1, j=0 switch(i) { case 2: j+=6; case 4: j+=...
问题:An instance member() ...
问题:单选题public class Test { private static int[] x; public static void main(String[] args) { System.out.println(x[0]); } } What is the result?()A 0B nullC Compilation fails.D A NullPointerException is thrown at runtime.E An ArrayIndexOutOfBoundsExc...
问题: public class X { public static void main (String[] args) ...
问题:单选题Which of the following range of short is correct?()A -27 -- 27-1B 0 -- 216-1C -215 -- 215-1D -231 -- 231-1...
问题:public class SyncTest{ public static void main(String args...
问题:public class TestFive { private int x; public void foo() {...
问题:多选题AnInterface is an interface. AnAdapter0 is a non-abstract, non-final class with a zero argument constructor. AnAdapter1 is a non-abstract, non-final class without a zero argument constructor, but with a constructor that takes one int argument. W...
问题:单选题public class Threads5 { public static void main (String[] args) { new Thread(new Runnable() { public void run() { System.out.print(”bar”); } }).start(); } } What is the result?()A Compilation fails.B An exception is thrown at runtime.C The c...