Array question

Posted on 2006-04-24
Last Modified: 2010-04-16
I have 2 string[]

String[] standard = new String[]{"Ronnie", "Jack", "Lori", “Max”, “Tricky”};
String[] temp = new String[]{"Lori", “Max”, "Jack", “Mary”};

Here's are the thing i want to do:

* Use Array "standard" as the standard for Array "temp" to add any name(s) that Array "standrad" has and Array  "temp" doesn't.  Remove any name(s) from Array "temp" that  Array "standrad" doesn't has.  Then sort Array "temp", so that the order and the number of names should be identical between Array "standard" and Array "temp".  Thx
Question by:musclejack

    Author Comment

    Example please. thx
    LVL 85

    Accepted Solution

    What an odd question...

    If you remove from temp, anything that is not in standard, AND then add to temp anything in standard not already in temp, THEN what you have done is made a COPY of standard!

    Why not just CLONE standard using the built-in Clone() method of the Array class, and then sort the Array using the built-in Sort() method:

    Your question only makes sense if this is a homework assignment.  In which case you need to show us your attempt and ask specific questions about the problems you are having.  We can't do homework assignments for people.

    Apologies if this is NOT homework...

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now