pravin pravin - 11 months ago 44
Android Question

What is the main difference between "List and Arraylist" , "HasMap and Treemap", "Boolean and boolean" and when to use when?

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<>();
 String [] yourArray = yourList.toArray(new String[yourList.size()]);