Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   arraylist help (http://www.go4expert.com/forums/arraylist-help-t1178/)

kodirl 12Aug2006 17:11

arraylist help
2 questions I do not have aclue about the 1st one do not know where to start.Second one I attempted but I do not know the code for staying on the first item and checking every other item against it to see if there are any duplicates.So can sum 1 pls help thanks

import java.util.ArrayList;
class ArrayListExtra extends ArrayList
public boolean occursUpTo( Object query, int limit)
//does 'query' occur amongst the first 'limit' items in this 'ArrayListExtra' object?



public void removeDuplicates( )
//remove all duplicate items from this ArrayListExtra object,
//so that it now contains exactly one occurrence of each item
for( int i=0;i<this.size( );i ++)

shabbir 12Aug2006 17:34

Re: arraylist help
I could not get what you are asking can you frame your questions a bit in a better way.

All times are GMT +5.5. The time now is 13:57.