Free Android Tutorials, Android Tips, Android Developments, Free Android Codings., Free Android App Examples, Open Source Code for Android
Friday, 27 June 2014
In Java, remove empty elements from a list of Strings
List<String> list =newArrayList<String>(Arrays.asList("","Hi",null,"How"));System.out.println(list);
list.removeAll(Arrays.asList("",null));System.out.println(list);
No comments:
Post a Comment