QUESTION 59자격증/OCJP_ExamC2018. 7. 26. 19:14
Table of Contents
반응형
QUESTION 59Given:public class Base {public static final String FOO = "foo";public static void main(String[] args){Base b = new Base();Sub s = new Sub();System.out.print(Base.FOO);System.out.print(Sub.FOO);System.out.print(b.FOO);System.out.print(s.FOO);System.out.print(((Base) s).FOO);}}class Sub extends Base {public static final String FOO = "bar";}What is the result?A. foofoofoofoofooB. foobarfoobarbarC. foobarfoofoofooD. foobarfoobarfooE. barbarbarbarbarF. foofoofoobarbarG. foofoofoobarfooSolution : D
plus imformation
Base 와 Sub의 인스턴스 구별 .
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 60 (0) | 2018.07.26 |
---|---|
QUESTION 58 (0) | 2018.07.26 |
QUESTION 57 (0) | 2018.07.26 |
QUESTION 56 (0) | 2018.07.26 |
QUESTION 55 (0) | 2018.07.26 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상