
Untitled
By: a guest on
Aug 12th, 2012 | syntax:
None | size: 0.67 KB | hits: 8 | expires: Never
package zwei;
import java.util.HashMap;
public class bla {
static HashMap<Integer, String> kopie = new HashMap<Integer, String>();
static HashMap<Integer, String> zwo = new HashMap<Integer, String>();
public bla(HashMap<Integer, String> zwo){
for(Integer single : zwo.keySet()){
kopie.put(single, zwo.get(single));
}
}
public static void main(String[] args) {
for(int i=0 ; i<10 ; i++){
//Animal p = new Animal(wurstkopf);
zwo.put(i, "wurstkopf"+i);
}
bla abc = new bla(zwo);
for(Integer single : kopie.keySet()){
System.out.println(single);
System.out.println(kopie.get(single));
}
}
}