ABOUT
TAGS
Narendra Kumar Dantala
  • Generics
       Compile-time type safety for collections without casting
       A generic is a method that is recompiled with different types as the need arises
       Instead of saying  List list = new ArrayList(); ,
       you will have to say List<String> list = new ArrayList<String>();
       a) Provides compile-time checking to make sure you are using the correct type
       b) No casting

  • Enhanced for loop
       Eliminates the drudgery and error-proneness of iterators
       Oldway:
       for (Iterator i = c.iterator(); i.hasNext(); ) {
               SomeTask tt = (SomeTask) i.next();
               tt.cancel();
       }
       // c is of Collection Type
       Newway:
       for ( SomeTask task : c )
       {
               task.cancel();
       }
  • Autoboxing/unboxing
       Avoids manual conversion between primitive types (such as int) and wrapper types (such as Integer)
       Java wont let you use a primitive type where an object is required, you need a wrapper. Similarly
       vice-versa, you need to unwrap it.
       But Java 1.5 makes it automatic.
       For ex:
       Map<String, Integer> map = new TreeMap<String, Integer>();
       for (String str : list) {
               map.put(str, 1);
       }
       
  • Typesafe enums
       Provides all the well-known benefits of the Typesafe Enum pattern
       An enumeration, or “enum,” is simply a set of constants to represent various values
  • Static import
       Lets you avoid qualifying static members with class names
  • Metadata
       Tools to generate boilerplate code from annotations in the source code
       Leads to a "declarative" programming style where the programmer says what should be done and tools
       emit the code to do it.
Whats new in Java 1.5(aka Tiger)
  • java.util.concurrent package
       This is a new package that was introduced in Java 1.5 ( aka Tiger ), it helps developers simplify the development of concurrent
       classes and applications by providing high quality implementations of common building blocks used in concurrent applications.
       - you can go through the articles for more details.

A J2EE Developer
Having a masters degree in Computational Science, working in Java, developed applications on different domains such as Finanical Services, B2B, Banking, Utility...