..
EaxmA QUESTION 23
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

QUESTION 23

Given:

21. class Money {

22. private String country = "Canada";

23. public String getC() { return country; }

24. }

25. class Yen extends Money {

26. public String getC() { return super.country; }

27. }

28. public class Euro extends Money {

29. public String getC(int x) { return super.getC(); }

30. public static void main(String[] args) {

31. System.out.print(new Yen().getC() + " " + new Euro().getC());

32. }

33. }


What is the result?

A. Canada

B. null Canada

C. Canada null

D. Canada Canada

E. Compilation fails due to an error on line 26.

F. Compilation fails due to an error on line 29.


Correct Answer: E



'DEV > ocjp' 카테고리의 다른 글

EaxmA QUESTION 35  (0) 2015.02.10
EaxmA QUESTION 34  (0) 2015.02.10
EaxmA QUESTION 33  (0) 2015.02.10
  Comments,     Trackbacks