import java.util.ArrayList; import java.util.List; public class Tester { public static void main(String[] args) { List<String> list1 = new ArrayList<String>();//line 1 List<Object> list2 = list1;//line 2 list2.add(new Integer(12));//line 3 System.out.println(list2.size());//line 4 } }
import java.util.List;
public class Tester {
public static void main(String[] args) {
List<String> list1 = new ArrayList<String>();//line 1
List<Object> list2 = list1;//line 2
list2.add(new Integer(12));//line 3
System.out.println(list2.size());//line 4
}
Oracle Certified Professional Java Programmer
Access: Public Instant Grading
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use.