Giventhatcisareferencetoavalidjava.io.Consoleobject,and:11.Stringpw=c.readPassword("%s","pw:");12.System.out.println("got"+pw);13.Stringname=c.readLine("%s","name:");14.System.out.println("got",name);Iftheusertypesfidowhenpromptedforapassword,andthenrespondsbobwhenpromptedforaname,whatistheresult?()

A.Anexceptionisthrownatruntime B.pw:fidogotfidoname:bobgotbob C.pw:gotfidoname:bobgotbob D.Compilationfails.

时间:2023-12-20 10:52:16

相似题目