← Back to Users
ruroshin's activity in the archive.
for(object o in list) { Item item = (Item) o; System.Out.Println(item);}
For a one liner you don't need the brackets and you don't have to cast objects if the list was properly declared. You could write above:
for(Item item: list) System.out.println(item);
Not as busy as her kid!
for(object o in list) {
Item item = (Item) o;
System.Out.Println(item);
}
For a one liner you don't need the brackets and you don't have to cast objects if the list was properly declared. You could write above:
for(Item item: list)
System.out.println(item);
Not as busy as her kid!