Home:ALL Converter>Difference between following declarations in ArrayList

Difference between following declarations in ArrayList

Ask Time:2014-08-11T14:43:47         Author:BASANT

Json Formatter

What is the difference between the following declarations:

 ArrayList<Object>  arr=new ArrayList<Object>();

 ArrayList arr=new ArrayList();

What happens if we use add method or any other method of ArrayList in the condition above? How does it work?

Author:BASANT,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25237194/difference-between-following-declarations-in-arraylist
Ruchira Gayan Ranaweera :

ArrayList<Object> arr=new ArrayList<Object>(); // Object type \n\nArrayList arr=new ArrayList(); // raw type\n\n\nWhat is row types",
2014-08-11T06:44:52
yy