单项选择题
What will be written to the standard output when the following program is run?() public class Q63e3 { public static void main(String args[]) { System.out.println(9 ^ 2); } }
A.81 B.7 C.11 D.0 E.false
WritealineofcodethatdeclaresavariablenamedlayoutoftypeL...
填空题Write a line of code that declares a variable named layout of type LayoutManager and initializes it with a new object, which when used with a container can lay out components in a rectangular grid of equal-sized rectangles, 3 components wide and 2 components high.()
Given that a static method doIt() in a class Work repre...
Given that a static method doIt() in a class Work represents work to be done, what block of code will succeed in starting a new thread that will do the work? CODE BLOCK a: Runnable r = new Runnable() { public void run() { Work.doIt(); } }; Thread t = new Thread(r); t.start(); CODE BLOCK b: Thread t = new Thread() { public void start() { Work.doIt(); } }; t.start(); CODE BLOCK c: Runnable r = new Runnable() { public void run() { Work.doIt(); } }; r.start(); CODE BLOCK d: Thread t = new Thread(new Work()); t.start(); CODE BLOCK e: Runnable t = new Runnable() { public void run() { Work.doIt(); } }; t.run();
A.Code block a. B.Code block B. C.Code block c. D.Code block d. E.Code block e.
What will be written to the standard output when the fo...
What will be written to the standard output when the following program is run?() public class Qd803 { public static void main(String args[]) { String word = "restructure"; System.out.println(word.substring(2, 3)); } }
A.est B.es C.str D.st E.s