複選題
第27題
Given:
10. class One{
11. void foo(){}
12. }
SCJP 6.0 認證教戰手冊 黃彬華著 碁峰出版
14
13. class Two extends One{
14. //insert method here
15. }
Which three methods, inserted individually at line 14, will correctly complete class Two? (Choose three.)
(A) int foo(){/* more code here */}
(B) void foo(){/* more code here */}
(C) public void foo(){/* more code here */}
(D) private void foo(){/* more code here */}
(E) protected void foo(){/* more code here */}
詳解 (共 2 筆)
未解鎖
1.繼承體系下,子類別存取權限不能低於父...
未解鎖
此概念為子類別改寫父類別:改寫規則:方法...