Java How to create a ArrayList with multiple columns/datatypes -
i trying create arraylist have 3 columns of type (date, date, string)
so table of multiple values, example:
jan 11, jan 11, "started" jan 11, jan 15, "running" ... jan 20, jan 23, "slowing" jan 23, jan 23, "stopped"
how go creating arraylist this? or there data format better? sorry new java , trying learn. also, need able pass data structure between different classes.
thanks lot!
in arraylist can't have multiple columns, arraylist
similar 1 dimensional array , can store objects of datatype.
the solution depends on problem trying resolve. if data trying store in 1 row related , have unique identity can use hashmap, or can create class columns fields , store instances of class in arraylist
.
hope helps.
Comments
Post a Comment