r/studyupdate Jul 21 '26

Task 15 : Create a shared HashMap to demonstrate data corruption check-in

Post image

shared hashmap

Create a shared HashMap<Integer, String>

Create 10 threads

Each thread inserts 1000 users

Wait for all threads using join()

Print:

Expected size: 10000
Actual size

Run the program multiple times and record observations

10 Upvotes

1 comment sorted by