How can I create a list without defining a class type? ()
If I'm reading this correctly, you just want to avoid having to specify the type, correct?
In Java 7, you can do
List list = new ArrayList<>();
but any of the other alternatives being discussed are just going to sacrifice type safety.