java syntax

Sintassi di java che non mi ricordo o che uso per le prime volte

Hash Table e ArrayList()

        List<String> contacts=new ArrayList<String>(10);
        for (int i = 0; i < 10; i++) {
        Hashtable<Integer, String> contactHTable=null;
        contactHTable=new Hashtable<Integer, String>(10);    
        int i=0;
            //For each
        for (String con : contacts)
            contactHTable.put(new Integer(i), con);
        System.out.println(contactHTable.get(new Integer(5)));
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License