题目内容

以下语句哪个用于创建线程池?()

A. ExecutorService executor = Executors.newCachedThreadPool();
B. ExecutorService executor = Executors.newCachedThreadPool(1);
C. ExecutorService executor = Executors.newCachedThreadPool(2);
D. ExecutorService executor = Executors.newCachedThreadPool(3);

查看答案
更多问题

以下哪条语句输出smith\exam1\test.txt()

A. System.out.println("smith\exam1\test.txt");
B. System.out.println("smith\\exam1\\test.txt");
C. System.out.println("smith\"exam1\"test.txt");
D. System.out.println("smith"\exam1"\test.txt");

方法()用来获取文本控件jtf上的内容

A. jtf.getText(s)
B. jtf.getText()
C. jtf.getString()
D. jtf.findString() 运行下列代码会出现什么结果? (A) public class Ref{ public static void main(String argv[]) { Ref r = new Ref(); r.amethod(r); } public void amethod(Ref r){ int i=99; multi(r); System.out.println(i); }

哪条语句用来创建temp.txt的文件输入对象?()

A. new Scanner("temp.txt")
B. new Scanner(temp.txt)
C. new Scanner(new File("temp.txt"))
D. new Scanner(File("temp.txt"))

运行下段代码后,z的结果为() int a = 1, z=0; do { ++z; } while(a

A. 0
B. 1
C. 2

答案查题题库