Hello,
I am writing a program for storing a row of a spreadsheet. In this program, I am creating a object for each row.
The issue is that my ArrayList is causing a error:
/tmp/sub-426260014/Cereal.java:7: error: cannot find symbol
private Arraylistlist;
The instance seems to cause the error and I am not sure why.
The 5 should cast as a Integer.
import java.util.Scanner;
public class Cereal {
public class Row {
private int rowNum;
private String type;
private Arraylist<Integer>list;
public Row(int num, String t, ArrayList<Integer>values){
rowNum = num;
type = t;
list = values;
}
}
public static void main(String[] args) {
ArrayList<Integer> nums = new ArrayList<Integer>();
nums.add(5);
Row row1 = new Row(1, "C", nums);
}
}