4 ms·
In addition to the other comments, the Utility class used in this example defeats the purpose of OO programming that Java is more in tune with. What's to stop
by bfung 17y ago
In addition to the other comments, the Utility class used in this example defeats the purpose of OO programming that Java is more in tune with. What's to stop the proliferation of these Util classes with static methods?
I believe the more Java way would be to extend the List interface to add a map method and implement a corresponding class. To make this less of a pain, extend from one of the JDK provided classes if possible... but yes, it's still a pain.