I found this on stack overflow. It's what Tilmann mentioned in the meeting 
today: create a new instance of Map and initialize it.

Map<String,String> test = new HashMap<String, String>() {
    {
        put (key1, value1);
        put (key2, value2);
    }
};

Not quite as elegant as JSON or Ruby but it is Java...

Craig L Russell
Secretary, Apache Software Foundation
c...@apache.org http://db.apache.org/jdo

Reply via email to