Results 1 to 6 of 6

Thread: What does Legacy Class mean in java?

  1. #1
    Join Date
    May 2009
    Posts
    735

    What does Legacy Class mean in java?

    Hello friends,

    I am new to the java programming. I know the C++ language very well but the "Legacy Class" concept is entirely new for me. And it sounds complicated to understand. I have many java books for "Legacy Class", but nothing was helpful. I wonder if anyone is able to provide me some information about the "Legacy Class" of java programming. Your help would be greatly appreciated.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: What does Legacy Class mean in java?

    Legacy Class of java is related to the synchronization. Legacy class is the concept of the collection framework and which is from the "utill package". StringTokenizer is a example of legacy class in java and which used for the compatibility. But the thing is that it is discouraged in new java programming code. While using this feature of java you should make the use of the split method or the package known as "java.util.regex".

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: What does Legacy Class mean in java?

    Mostly the legacy classes are from the older version of the java programming language.The "StringTokenizer " is the good example of the Legacy Class. The "Enumeration " is also the type of "Legacy Class". The legacy classes are nomally use to increase the performance of the java program. The HashTable and vector are also come into legacy classes. These classes are basically referred as "synchronized classes".

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: What does Legacy Class mean in java?

    Following are some example of Legacy Class in Java:
    • Hashtable: The HashTable is identical to "hashMap
    • Vector: It is used for the automatic allocation of memory.
    • Dicitionary: It is usd to store the value of dictionary instead of the map.
    • Properties : The "Properties are nothing but the subclass of the "Hashtable."

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: What does Legacy Class mean in java?

    Hi,

    Following is the example of "Vector" class and which is the part of the "Legacy Class" of java. I hope it will help you to understand the Legacy Class concept of java.
    import java.util.Vector;
    import java.util.Iterator;

    public class VectorDemo
    {

    public static void main(String args[])
    {

    Vector vector1 = new Vector();

    vector.add("Atlantic ");
    vector.add("Arctic ");
    vector.add("Pacific");

    for(Iterator iterator1 = vector.iterator1(); iterator.hasNext(); )
    {
    String oceanName1 = (String) iterator.next();
    System.out.println(oceanName1);
    }
    }
    }

  6. #6
    Join Date
    May 2008
    Posts
    2,389

    Re: What does Legacy Class mean in java?

    Hi friend,

    The Legacy Classes of java are basically taken from the "Java.util" package. The Properties, Stack, Hashtable, Dicitionary these classes are integrated from the Legacy Class. The "Hashtable" is used for to hold the objects which are used of the overriding of the equals( ) as well as the hashCode( ) methods. These methods of Hashtable compute the hash code of the object. I hope these information will help you to know about the "Legacy Class"

Similar Threads

  1. Which Class have biggest advantage in Scarlet Legacy
    By Gaharwar in forum Video Games
    Replies: 6
    Last Post: 07-08-2011, 10:59 PM
  2. What class do you wish to play in Scarlet Legacy
    By Dead-Man in forum Video Games
    Replies: 7
    Last Post: 06-08-2011, 11:16 PM
  3. Converting java class to java bean class
    By Ucchal in forum Software Development
    Replies: 6
    Last Post: 09-08-2010, 10:24 AM
  4. Java ME SDK 3.0 Math Class
    By Jona-thon in forum Software Development
    Replies: 5
    Last Post: 15-07-2010, 11:48 PM
  5. Java Programming Language Basics: Reflection Basics and Class Class
    By mayuri_gunjan in forum Guides & Tutorials
    Replies: 6
    Last Post: 29-08-2005, 12:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,047,725.80190 seconds with 17 queries