I have the following class for arraylist with int array.
public class MyClass extends ArrayList<MyClass> {
public int[] numAsc = {};
public int[] numDsc = {};
public MyClass(int[] numAsc , int[] numDsc){
this.numAsc = numAsc ;
this.numDsc = numDsc;
}
}
When I am trying add elements to arraylist, I am just getting empty arrays.
ArrayList<MyClass> numberSeries = new ArrayList<MyClass>();
int[] orders = {1,2,3};
int[] request = {3,2,1};
numberSeries.add(new MyClass(orders,request));
Log.d(TAG, "numberSeries: " + numberSeries);
RESULT FROM LOGCAT: numberseries: [[]]
What am I missing here?