Home Archives for April 2015
Tuesday, April 28, 2015
Monday, April 27, 2015
Saturday, April 4, 2015
How to remove duplicate element from String array and List.
1 ) String Array.
Ex : String nameArray = {“Ram”,”Shyam”,”Mohan”,”Sohan”,”Ram”,”Shyam”,”Mohan”};
2 ) ArraList.
Ex : [“Ram”,”Shyam”,”Mohan”,”Sohan”,”Ram”,”Shyam”,”Mohan”]
As we know the Set collection having the feature to allow the store unique value. Based on that we have follow two step here to removing the duplicate from string array-
Ex : String nameArray = {“Ram”,”Shyam”,”Mohan”,”Sohan”,”Ram”,”Shyam”,”Mohan”};
2 ) ArraList.
Ex : [“Ram”,”Shyam”,”Mohan”,”Sohan”,”Ram”,”Shyam”,”Mohan”]
As we know the Set collection having the feature to allow the store unique value. Based on that we have follow two step here to removing the duplicate from string array-
Subscribe to:
Posts
(
Atom
)