Originally posted by Avander Be:
What puzsles me is where did that List type come from?? The only List type I found in the Java doc is an... interface!
You must have overlooked java.awt.List, but that's a GUI element
It's right that java.util.List is an interface. The Arrays class has an internal class that implements List and wraps arrays. An instance of this class is instantiated when you call Arrays.asList. You don't need to know the full name of the class, only that it implements List, and you cannot add or remove elements. All other List methods can be called without a problem.