Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Static Map Initialization

807591Mar 5 2008 — edited Mar 5 2008
Hi. I want to have a Map constant on my application. How can I fill it? For example, if it's a List I can do this:
public static final Collection myList = Arrays.asList(firstThing, secondThing);
I would like to have a similar thing but with a map. How can I do that?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 2 2008
Added on Mar 5 2008
9 comments
573 views