"SCJP 1.6版考題 201" 修訂間的差異
出自 陳富國維基館
(新頁面: 檔案:SCJP201-1 2.png Given: 1. import java.util.*; 2. class A{} 3. class B extends A{} 4. public class Test{ 5. public static void main(Strang[] args){ 6. List<A> l...) |
(無差異)
|
於 2013年3月30日 (六) 00:11 的最新修訂
Given: 1. import java.util.*; 2. class A{} 3. class B extends A{} 4. public class Test{ 5. public static void main(Strang[] args){ 6. List<A> listA = new LinkedList<A>(); 7. List listB = new LinkedList<B>(); 8. List<Obect> listO = new LinkedList<Obect>(); 9. //insert code here 10. } 11. public static void m1(List<? extends A> list){} 12. public static void m2(List<A> list){} Place a result onto each method call to indicate what would happen if the method call were inserted at line 9. Note: Results can be used more than once.
|