blob: 57e5e477193301988f484c5946a866ef9c4e5a43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Test3 {
/**
* @param args
*/
public static void main(String[] args) {
List<Customer> list = new ArrayList<Customer>();
list.add(new Customer("Nuwan"));
list.add(new Customer("Lasitha"));
list.add(new Customer("Praveen"));
for (Customer c : list) {
// Do some work with c here
System.out.println(c);
}
}
}
|