I am bit confused regarding the differences between the following types in Android:-
1.List and Arraylist
2. HashMap and TreeMap
3. Boolean and boolean
Also I want suggestion that in Android its better to use SharedPreferences or Android Sqlite ? And how to use new FIREBASE database ??
Also, Please suggest me when to use which type...??
Try this code:
List<String> yourList = new ArrayList<>(); yourList.add("text1"); yourList.add("text2"); String  yourArray = yourList.toArray(new String[yourList.size()]);