Simplest way : you can use this approach to add multiple elements to any type of collection like ArrayList and HashSet
ArrayList<String> allViews = new ArrayList<String>();Collections.addAll(allViews,"hello","world","abc","def","ghi");
Simplest way : you can use this approach to add multiple elements to any type of collection like ArrayList and HashSet
ArrayList<String> allViews = new ArrayList<String>();Collections.addAll(allViews,"hello","world","abc","def","ghi");