Which method in the Thread class is used to create and launch a new thread of execution?()
A、 Run();
B、 Start();
C、 Execute();
D、 Run(Runnable r);
E、 Start(Runnable r);
F、 Execute(Thread t);
相关问题推荐
-
What is the result?()
A、 b,3
B、 b,8
C、 b,13
D、 f,3
E、 f,8
F、 f,13
G、 Compilation fails.
H、 An exception is thrown at runtime.
-
What is the result?()
A、 Compilation of class A fails.
B、 Line 28 prints the value 3 to System.out.
C、 Line 28 prints the value 1 to System.out.
D、 A runtime error occurs when line 25 executes.
E、 Compilation fails because of an error on line 28.
-
Given that the current directory is empty, and that the user has read and write privileges to the current directory, and the following: Which statement is true?()
A、 Compilation fails.
B、 Nothing is added to the file system.
C、 Only a new file is created on the file system.
D、 Only a new directory is created on the file system.
E、 Both a new file and a new directory are created on the file system.
-
10. interface Foo { int bar(); } 11. public class Sprite { 12. public int fubar( Foo foo) { return foo.bar(); } 13. public void testFoo() { 14. fubar( 15. // insert code here 16.); 17. } 18. } Which code, inserted at line 15, allows the class Sprite to compile?()
A、 Foo { public int bar() { return 1; } }
B、 new Foo { public int bar() { return 1; } }
C、 newFoo() { public int bar(){return 1; } }
D、 new class Foo { public int bar() { return 1; } }
-
Which statements about Java code security are true?()
AThe bytecode verifier loads all classes needed for the execution of a program.
BExecuting code is performed by the runtime interpreter.
CAt runtime the bytecodes are loaded, checked and run in an interpreter.
DThe class loader adds security by separating the namespaces for the classes of the local file system from those imported from network sources.