Robentry [] Rb = new Robentry[robNum];
How can I store Rb into an ArrayList<E> Rt, so that Rt.get(0) == Rb is true. I do not know how to define E in the ArrayList<E>.
Edit:
If I use :
Robentry [] Rb = new Robentry[robNum];
List<Robentry []> Rt = new ArrayList<Robentry []>();
// initialize Rb
//...
//
Rt.add(Rb);
If I change Rb[0], Rt.get(0)[0] is also changed. So how can I store the content of Rb into Rt so that Rt is independent of Rb?
ArrayList<RobEntry[]>, since Rb is of typeRobEntry[].Rt.add(Rb.clone());for your second problem.