pravin pravin - 1 year ago 70
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...??

Answer Source

Try this code:

 List<String> yourList = new ArrayList<>();
 String [] yourArray = yourList.toArray(new String[yourList.size()]);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download