0

[Solved] Getting HashMap keys / values from other method inside a same program

I'm able to get the values from a HashMap and iterate it from main method. But after I pass the HashMap to other method it doesn't work anymore. Can anyone explain? https://code.sololearn.com/cqKegnWmXNo6/?ref=app

15th Nov 2023, 6:38 AM
Wong Hei Ming
Wong Hei Ming - avatar
1 Answer
0
Jay Matthews Thanks! I thought it works like int x or String x as other datatype. Didn't realize has to specify the class type as well.
15th Nov 2023, 7:21 AM
Wong Hei Ming
Wong Hei Ming - avatar