I am getting an error that says... "put(Object,Object) in UIManager cannot be applied to (int) "
Random rand = new Random();
int randomNum = rand.nextInt(7)+1;
Map <String, Integer> colours = new HashMap<>(); {{
put("red",1);
put("white",2);
put("purple",3);
put("orange",4);
put("pink",5);
put("yellow",6);
put("green",7);
put("blue",8);
}};
Map <String, Integer> answer = new HashMap<>(); {{
put(randomNum);
put(randomNum);
put(randomNum);
put(randomNum);
}};
I'm trying to set a map full of colours, then apply 4 random colours to a new map. It'll allow any colour etc pink pink pink pink, red yellow white white... Where am I going wrong with this?