1)What is difference between List and Map? whether index position of List just be integer ?and key value of Map, it can be anything?
List and Map are both collections which store data. type of storing is different. List stores data by order using indexes. Map stores data in the form of key/value pairs. key must be unique. index position of List must be integer.
Collections does not store primitive data. But due to autoboxing concept primitives are automatically converted to corresponding wrapper objects.
2) what is difference between ArrayList and Array?
arrays are homogeneous, i.e., they store only declared type data. ArrayList prior to 1.5 stores any kind of data which is not type safe and may also throw ClassCastException.
ArrayList with generics stores declared type data..
arrays cannot grow. i.e., their size is fixed. During initialization we fix the size. An ArrayList can grow.
There are no methods to manipulate arrays. That means suppose if you want to remove an element from array , there are no methods for removing an element from array. ArrayList contains remove method to remove data from list.