Seminar "Selected Topics in Software Engineering" Christopher Oezbek Freie Universität Berlin, Department of CS
Seminar "Selected Topics in Software Engineering" Christopher Oezbek Freie Universität Berlin, Department of CS
• In other words:
Wherever people were complaining too much that Java is
too verbose, they made some adjustments.
• Generics
Compile-time type safety for collections without casting
• Enhanced for loop
Syntactic sugar to support the Iterator interface
• Autoboxing/unboxing
Automatic wrapping and unwrapping of primitives
• Typesafe enums
Provides all the well-known benefits of the Typesafe Enum pattern
• Static import
Lets you avoid qualifying static members with class names
• Scanner and Formatter
Finally, simplified input and formatted output
public Box() {
contents = new ArrayList<T>();
}
public T grab() {
if (contents.size() > 0) return contents.remove(0);
else return null;
}
/*...*/
• String line;
int i = 1;
while ((line = reader.readLine()) != null) {
System.out.printf("Line %d: %s\n", i++, line);
}
• Threading
There are many new features for controlling
synchronization and threading which increase performance
and prevent that you have to write synchronization
primitives yourself.
• Monitoring and Profiling API
It is now easier to observe what's going on inside the JVM
• Unicode 4.0
• RMI
rmic is no longer needed to generate stubs/skeletons.
• New skin for Swing
Thank you!