Results 1 to 5 of 5

Thread: legacy classes

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Answers
    1

    legacy classes

    hi,
    may i know what are the legacy classes...? and where we can use these classes...?


  2. #2
    Expert Member
    Join Date
    Apr 2008
    Answers
    1,859

    Re: legacy classes

    hai friend,

    Legacy means synchronization (more complicated with technology).It an concept to the collection of framework (utill package).

    For example: vector , HashTable, etc are legacy classes( synchronized classes).Synchronized classes gives an concept of thread based. If so many request is coming to access a single resources then it will lock all request and will do process one by one with sequence order (FIFO).

    Thanks
    Deepa


  3. #3
    Expert Member
    Join Date
    May 2009
    Answers
    1,374

    Re: legacy classes

    Hi,

    In java, legacy classes are system components that we continue to work with, even though they may be deprecated, use deprecated methods or sub-optimal programming techniques,

    for example ,

    Systems may use legacy classes from third party suppliers that are no longer maintained, for which no source code is available.

    Ideally, one would replace such legacy classes with contemporary implementations, but sometimes the extent of a system's dependence on legacy classes makes them difficult or un-economical to replace.

    In this case, it is often necessary to use adapter classes that enable legacy classes to work with new programming interfaces.

    The legacy classes which are defined by java.utilare r.....

    1)vector

    2)hashtable

    3)properties

    4)dicitionary

    5)stack etc....

    Vector is a legacy class that was adapted in java software development kit version 1.2 to integrate it with the more contemporary collections framework. Vector now implements the collection interface.


    Thanks & Regards,

    Riju.


  4. #4
    Junior Member
    Join Date
    May 2008
    Answers
    6

    Re: legacy classes

    after reading dis post i was searching in the api for legacy classes ... i couldnt find ne?????
    do we have such classes in java?? if yes den in which package .. plz reply!


  5. #5
    Expert Member
    Join Date
    May 2009
    Answers
    1,374

    Re: legacy classes

    Hi,

    It's in Utility package.

    Eg:

    import java.util.Iterator;
    import java.util.Vector;

    public class VectorExample {

    public static void main(String[] args) {

    Vector vector = new Vector();
    vector.add("Pacific Ocean");
    vector.add("Atlantic Ocean");
    vector.add("India Ocean");
    vector.add("Arctic Ocean");

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


    Thanks,
    Riju.


  6.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact