Skip to content

Instantly share code, notes, and snippets.

@raviyasas
Created September 15, 2022 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raviyasas/ae1d42d0db5d182f1d7701ca21837aa8 to your computer and use it in GitHub Desktop.
Save raviyasas/ae1d42d0db5d182f1d7701ca21837aa8 to your computer and use it in GitHub Desktop.
Employee emp1 = new Employee(1,'Ann');
Employee emp2 = new Employee(2,'John');
Employee emp3 = new Employee(3,'Rex');
Map<Employee, String> myHashMap = new HashMap<>();
hashMap.put(emp1, 'IT');
hashMap.put(emp2, 'DEV');
hashMap.put(emp3, 'QA');
hashMap.put(null, 'QA');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment