Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package cglcgl;
- import java.util.HashMap;
- /**
- @author cagri.celebi
- */
- public class Deneme {
- public static void main(String[] args) {
- System.out.println("*** start ***");
- try {
- HashMap<Integer, HashMap<Integer, String>> haritaTutucu =
- new HashMap<Integer,HashMap<Integer, String>>();
- HashMap<Integer, String> tmpMap1 = new HashMap<Integer,String>();
- tmpMap1.put(1, "ayse");
- tmpMap1.put(2, "fatma");
- HashMap<Integer, String> tmpMap2 = new HashMap<Integer,String>();
- tmpMap2.put(1, "ahmet");
- tmpMap2.put(2, "mehmet");
- tmpMap2.put(3, "murat");
- haritaTutucu.put(1, tmpMap1);
- haritaTutucu.put(2, tmpMap2);
- System.out.println("2'nin 2'si : " + haritaTutucu.get(2).get(2)); // mehmet döner.
- } catch (Exception e) {
- e.printStackTrace();
- }
- System.out.println("*** end ***");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment