Is there such?
ps similar effect can be achieved somehow like this:
Map<Integer,Integer[]> map; map.set(1, (new Integer[n]) ); //то самое n
But somehow not very convenient
You probably need a Multimap
. There is no embedded solution, but Oracle offers essentially the same thing as you, only they have a List
instead of an array (see here , scroll down to Multimaps).
There are also many 3rdparty implementations, easy to googling .
Object[]
. But: you can add elements to the List gradually, and with an array you need to know in advance how many there will be. - VladDSource: https://ru.stackoverflow.com/questions/265029/
All Articles