java - I need to hold multiple int values in a Map -


i need create book index method can pair multiple values 1 key

e.g key - "beck,kent" value - 27 23 76

is possible?

the import ou.*; open university library , should not affect anything.

import java.util.*; import ou.*; public class bookindex {  public map<string, integer> index() {    map<string, integer> actual = new hashmap<>();    return actual; } 

thanks

how using integer array instead of integer in map<string, integer>.

 hashmap<string, integer[]> anewmap = new hashmap<string, integer[]>();   anewmap.put("beck,kent",new integer[] { 27, 23, 76}); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -