JDK 1.5 Features

1.GenericsAllows programmers to specify the types allowed for CollectionsAllows the compiler to enforce the type specifications//BeforeList stringList //In JDK 1.5List<String> stringList;2.Enhanced for loopA new language constuct for the Iterator pattern//Beforefor(Iterator i = line.iterator();i.hasNext(); ) {  String word = (String)i.next();  …}//In JDK 1.5for(String word: line){  …}3.AutoboxingEssentially bridges between the “primitive” types (such as int, boolean) and [...]

Follow

Get every new post delivered to your Inbox.