I have an arraylist with String, int and Date objects in it. I want to display the contents of the arraylist along with the object types of those contents.
Expected output:Code:ArrayList a1 = new ArrayList();
a1.add("Honda");
a1.add("Toyota");
a1.add(2);
a1.add(new Date());
Please advice.Code:Honda - String
Toyota - String
2 - int
Sun Jan 20 07:50:28 CET 2008 - Date
