Given: What is the result?()
A.Compilation fails. B.Cannot add Toppings C.The code runs with no output. D.A NullPointerException is thrown in Line 4.
单项选择题Given: What is the result?()
A.Hello B.Hello World C.Compilation fails. D.Hello World 5 E.The code runs with no output. F.An exception is thrown at runtime.
A.The code runs with no output. B.An exception is thrown at runtime. C.Compilation fails because of an error in line 20. D.Compilation fails because of an error in line 21. E.Compilation fails because of an error in line 23. F.Compilation fails because of an error in line 25.
多项选择题Given: Which two statements are true?()
A.The output could be 8-1 7-2 8-2 7-1 B.The output could be 7-1 7-2 8-1 6-1 C.The output could be 8-1 7-1 7-2 8-2 D.The output could be 8-1 8-2 7-1 7-2
A.Compilation fails. B.An exception is thrown at runtime. C.The code executes and prints "running". D.The code executes and prints "runningrunning". E.The code executes and prints "runningrunningrunning".
单项选择题Given that t1 is a reference to a live thread, which is true?()
A.The Thread.sleep() method can take t1 as an argument. B.The Object.notify() method can take t1 as an argument. C.The Thread.yield() method can take t1 as an argument. D.The Thread.setPriority() method can take t1 as an argument. E.The Object.notify() method arbitrarily chooses which thread to notify.