+ 2
Why does the language use .add() for some Collections and .put() for others. This seems inconsistent unless there is a good rea
son.
2 Respuestas
+ 6
.add() is a method used to add to a list, in things like arraylists and lists.
.put() is used for maps and hashmaps to set a certain key to a value.
+ 2
Thanks, that makes sense. :-)