... Monday=1, Sunday=7} monthMap: {April=30, February=28, September=30, July=31, October=31, November=30, December=31, March=31, January=31, June=30, May=31, August=31}
colorList: [red, orange, yellow, green, blue, indigo, violet]

colorSet: [violet, yellow, orange, green, blue, red, indigo]

dayMap: {Saturday=6, Tuesday=2, Wednesday=3, Sunday=7, Monday=1, Thursday=4,

monthMap: {February=28, August=31, July=31, November=30, April=30, May=31,
December=31, September=30, January=31, March=31, June=30, October=31}

Java SE 9 collection factory methods.

List Interface’s Convenience Factory Method of

Lines 10–11 use the List convenience factory method of to create an immutable List<String>. Method of has overloads for Lists of zero to 10 elements and ...

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.