Both are string values.
I do not believe the map will support a add method. I think it is a put method of some sort.
Map<String, String> studentGrades
= new HashMap<String, String>();
Scanner in = new Scanner(System.in);
studentGrades.put("Juliet", "89%");

New Topic/Question
Reply




MultiQuote




|