欢迎来到在线考试题库网 在线考试题库官网
logo
全部科目 > Oracle认证考试 > 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.

点击查看答案

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题