blob: 77ce6131f72c070c2b49e2a1b21aa8eaedd03177 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import java.util.HashMap;
import java.util.Map;
public class Test6Map {
/**
* @param args
*/
public static void main(String[] args) {
Map<String, Customer> customers = new HashMap<String, Customer>();
// Map<Integer, Account> accounts = ...
customers.put("nugegoda", new Customer("Kamal"));
customers.put("kalubowila", new Customer("Praveen"));
System.out.println(customers.get("kalubowila"));
}
}
|