Introduction
Java Map has a static initializer of(), which creates an Immutable Map Collection
You can create up to 10 Elements in this Map
For example
Java
What do to for more than 10 entries?
Now if you want to add key11 and value11, what can you do?
Unfortunately, you cannot just a simple Map.of() method anymore, rather use Map.ofEntries()
This method doesn’t have a hard cap.
Java
If you found another method, let me know in the comments below 🙂