fork download
  1. import java.util.*;
  2.  
  3. public class Main {
  4. public static void main (String[] args) {
  5. HashMap<String,String> myMap = new HashMap<String,String>();
  6.  
  7. myMap.put("1", "valor1");
  8. myMap.put("2", "valor2");
  9. myMap.put("3", "valor3");
  10.  
  11. myMap.put("valor1", "1");
  12. myMap.put("valor2", "2");
  13. myMap.put("valor3", "3");
  14.  
  15. System.out.println(myMap.get("valor1"));
  16. }
  17. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
1