SCJP5 95%, SCWCD 85%<br />Knowledge is the Life of Mind
package generics;
import java.util.*;
public class DemoArrayList2 {
public static void main(String... args) {
ArrayList<Integer> alist = new ArrayList<Integer>();
alist.add(1);
alist.add(2);
Collection<?> blist = new ArrayList<String>();
blist = alist;
//blist.get(0);
//Fails, Collection doesn't have get() method
//You can't add anything but null to the blist because of "?" the wildcard
//that simple means read only
System.out.println(blist);
}
}
cmbhatt