public static void main(String[] args){
List l = new ArrayList();
Object a = "hello";
l.add(a);
l.add("asdasd");
l.add("hgdfsdfshjk");
System.out.println(l.isEmpty()+"");
System.out.println(l.get(0));
for(int i=0;i<l.size();i++){
String b = (String)l.get(i);
System.out.println(b);
}
}
}[code]
i still havent figured out how to solve the warning it gives. can someone esplain to me the warning and maybe you could teach me how to properly use collections.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.