Advertisement
Albinutte

Java HM

Feb 17th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.io.*;
  2. import java.text.*;
  3. import java.util.*;
  4. import java.math.*;
  5. import java.util.regex.*;
  6.  
  7. public class Main {
  8.  
  9.   public static void main(String[] args) {
  10.     Map<Object, Object> test = new HashMap<>();
  11.  
  12.     test.put(0, 23);
  13.     test.put(1, "hello");
  14.     test.put(15, 34.5);
  15.     test.put("mamma mia!", 42);
  16.  
  17.     System.out.println(test.get("mamma mia!").equals(42));
  18.     System.out.println(test.get(1).equals("hello"));
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement