Write a program to remove duplicate elements from array list........
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Write a program to remove duplicate elements from array list........
Do you have any specific questions about your assignment?
Please post your code and any questions about problems you are having.
If you don't understand my answer, don't ignore it, ask a question.
i have array
int array[] = {1,2,1,3,4,5,2,3,4,5};
i want to remove duplicates from this array by usin simple java code without using any math rule like HASH. etc
output int this form...
{1,2,3,4,5}
Ok. What ideas do you have about how to remove the duplicates? You'll need to use some loops to scan through the array to look at each element.
At some time you'll need to create a new array that is the size of the unique elements and copy the unique elements to it.
If you don't understand my answer, don't ignore it, ask a question.