can i use hashmap in setter? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can i use hashmap in setter?

hi ! i want to make a library by hash maps in java ! and i wonder if i can use the hashmap in setter or getter instead of the main ... can you help me ( ੭ु´ ・∀ ・`) ु im still new so i dont know many things aboit java ∩˙▿˙∩

2nd Feb 2019, 8:18 AM
PinkCode
PinkCode - avatar
1 Answer
+ 2
I am not sure I fully understand your question but with HashMaps you can use their "built-in" modifier methods: get put remove. And you overwrite an element when you use its index again.
6th Apr 2019, 4:37 PM
Nonea
Nonea - avatar