File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/main/java/java_collections Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11package java_collections ;
22
3- import java .util .HashMap ;
43import java .util .Map ;
54
6- public class MainApp {
5+ public class HashMap {
76 private static final int NUMBER_OF_MAP_ENTRIES = 2 ;
87
98 public static void main (String ... args ) {
109 System .out .println ("Program started." );
11- MainApp mainApp = new MainApp ();
12- mainApp .understandHashMapInternalWorkings ();
10+ HashMap hashMap = new HashMap ();
11+ hashMap .understandHashMapInternalWorkings ();
1312 System .out .println ("Program finished." );
1413 }
1514
@@ -28,7 +27,7 @@ private void understandHashMapInternalWorkings() {
2827 *
2928 * To have a high-performance hashMap we need good implementation of hashCode() and equals() method along with hash function.
3029 * */
31- Map <String , String > map = new HashMap <>();
30+ Map <String , String > map = new java . util . HashMap <>();
3231 for (int i = 0 ; i < NUMBER_OF_MAP_ENTRIES ; i ++) {
3332 map .put ("key" + i , "value" + i );
3433 }
You can’t perform that action at this time.
0 commit comments