«
^
»
5.1 Using an ArrayList
The return type of
get
is also of type
Object
.
For this reason, you will (probably) want to cast the result:
0167: Date tNewDate = (Date)tList.get(1); 0168: System.out.println(tNewDate.getMonth());