View RSS Feed

Recent Blogs Posts

  1. What is Java Generics?

    by , 02-18-2012 at 04:32 PM
    Java provides support to the Generic features of JV. For specification of the concrete types to certain general methods or classes, Generics is used.

    Above given definition is an abstract definition. For better understanding, consider few examples.
    Object instances are stored by the help of List interface. Therefore one can do storage and also place objects in a List. E.g.

    Java Code:
    List list = new ArrayList();
    list.add(new Integer(2));
  2. Java Generics with legacy code

    by , 11-15-2011 at 07:31 PM (My Java Tips)
    In this post, I will write about how Java generics help us in using legacy code.

    Generics are new in Java and now developers understand the importance of it and it is being used as required. Question arises, what about the legacy code? Consider an IT firm that is working on an application for 5 years, and they used Java 1.4 for development. They the plan to use 1.5 for development simply because it is better than 1.4. Are they supposed to convert the old code to 1.5 also? This is ...