Hi,
I think there is an errata on Chapter 9, on pages 483/484. (
Map.of() and Map.CopyOf() explanation):
there is a factory method to create a Map. You pass any number of pairs of keys and values.
This isn't true, Map.of() only accepts maximum of 10 keys and values pairs.
Map also provides a method that lets you supply key/value pairs.
Now we can't forget to pass a value. If we leave out a parameter, the entry() method won't compile.
On the Map.of() if we forget to pass a value, the method won't compile either.
Thanks,
João