Monday, April 27, 2015

How to convert Java Object in JSON and how to retrieve it at client side

To converting a java object in JSON we need to user some 3rd party API here I’m using “gson.2.2.4.jar” .


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-