Under which circumstances will a thread stop?()
A、The method waitforId() in class MediaTracker is called.
B、The run() method that the thread is executing ends.
C、The call to the start() method of the Thread object returns.
D、The suspend() method is called on the Thread object.
E、The wait() method is called on the Thread object.
相关问题推荐
-
Which two are valid declarations within an interface definition?()
Avoid methoda();
Bpublic double methoda();
Cpublic final double methoda();
Dstatic void methoda(double d1);
Eprotected void methoda(double d1);
-
Which determines if “prefs” is a directory and exists on the file system?()
A、 Boolean exists=Directory.exists (“prefs”);
B、 Boolean exists=(new File(“prefs”)).isDir();
C、 Boolean exists=(new Directory(“prefs”)).exists();
D、 Boolean exists=(new File(“prefs”)).isDirectory();
E、 Boolean exists=true; Try{ Directory d = new Directory(“prefs”); } catch (FileNotFoundException e) { exists = false; }
-
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: j++; default:j++; } return j + x; } } What is the output from line 3? ()
A、 Value = 3
B、 Value = 4
C、 Value = 5
D、 Value = 6
E、 Value = 7
F、 Value = 8
-
public class Test{ public static void main( String[] argv ){ // insert statement here } } Which statement, inserted at line 3, produces the following output?() Exception in thread “main” java.lang.AssertionError: true at Test.main(Test.java:3)
A、 assert true;
B、 assert false;
C、 assert false : true;
D、 assert false == true;
E、 assert false: false;
-
25.intx=12; 26. while (x
A、 0
B、 10
C、 12
D、 Line 29 will never be reached.