1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
import java.util.HashMap;
public class HashMapTest {
/**
* @param args
*/
public static void main(String[] args) {
HashMap<String, Boolean> responses = new HashMap<String, Boolean>();
HashMap<String, HashMap<String, Boolean>>questions = new HashMap<String, HashMap<String,Boolean>>();
responses.put("reponse1", true);
responses.put("reponse2", false);
responses.put("reponse3", false);
questions.put("question1", responses);
responses.put("reponse1", false);
responses.put("reponse2", true);
responses.put("reponse3", false);
questions.put("question2", responses);
System.out.println( questions );
}
} |
Partager