Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.HashMap;
- public class HashMapAwesomeness {
- public static void main(String[] args) {
- int a=10;
- int b=3;
- int c=88;
- HashMap<String,Integer> happy=new HashMap<String,Integer>();
- //left side is key and right side is what is stored in it
- happy.put("a",10);
- happy.put("b",3);
- happy.put("c",88);
- System.out.println(happy);
- System.out.println(happy.get("c"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement