black

OCJP(310-065)

登录

单项选择题

Given that c is a reference to a valid java.io.Console object, and:
11.String pw = c.readPassword("%s", "pw: ");
12.System.out.println("got " + pw);
13.String name = c.readLine("%s", "name: ");
14.System.out.println(" got ", name);
If the user types fido when prompted for a password, and then responds bob when prompted for a name,what is the result?()

A.An exception is thrown at runtime
B.pw: fido got fido name: bob got bob
C.pw: got fido name: bob got bob
D.Compilation fails.

相关考题

多项选择题 WhichtwoscenariosareNOTsafetoreplaceaStringBufferobjectwithaStringBuilderobject?()

单项选择题 Given: 12.Date date = new Date(); 13.df.setLocale(Locale.ITALY); 14.String s = df.format(date); The variable df is an object of type DateFormat that has been initialized in line 11. What is the result if this code is run on December 14, 2000?()

单项选择题 Given: What is the result?()

All Rights Reserved 版权所有©建筑考试题库(jzkao.com)

备案号:湘ICP备2020024380号-3