問題詳情

154Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of textfrom the console? (Choose two.)
(A) String s = c.readLine();
(B) char[] c = c.readLine();
(C) String s = c.readConsole();
(D) char[] c = c.readConsole();
(E) String s = c.readLine("%s", "name "); (AB) char[] c = c.readLine("%s", "name ");

參考答案

無參考答案

內容推薦