QUESTION 15자격증/OCJP_ExamD2018. 7. 30. 00:36
Table of Contents
반응형
QUESTION 15Given 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. pw: got fido name: bob got bobB. pw: fido got fido name: bob got bobC. pw: got fido name: bob got bobD. pw: fido got fido name: bob got bobE. Compilation fails.F. An exception is thrown at runtime.Solution : E
plus imformation
Main.java:14: cannot find symbol
symbol : method println(java.lang.String,java.lang.String)
location: class java.io.PrintStream
System.out.println(" got ", name);
^ 1 error
더 자세히 알아 보기 : http://pracon.tistory.com/42 <-- 이링크를 통해 자세히 알아보기
반응형
'자격증 > OCJP_ExamD' 카테고리의 다른 글
QUESTION 17 (0) | 2018.07.31 |
---|---|
QUESTION 16 (0) | 2018.07.31 |
QUESTION 14 (0) | 2018.07.30 |
QUESTION 13 (0) | 2018.07.30 |
QUESTION 12 (0) | 2018.07.30 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상