trying to program a simple note taking app and I converted an array to an arraylist and took it out of being static and android studio is pointing out the error on "gettaskdata"
taskData = (ArrayList)tData.gettaskdata();
recView = (RecyclerView)findViewById(R.id.task_list);
recView.setLayoutManager(layoutManager);
btn1 = (Button)findViewById(R.id.btn1);
adapter = new tAdapter(tData.gettaskdata(),this);
here is where "gettaskdata"originates
private String [] task0 = {"task 1", "task 2", "task 3"};
private List<String> task1 = new ArrayList<String>(Arrays.asList(task0));
private final int [] icons = {R.drawable.ic_check_box_outline_blank_black_24dp,R.drawable.ic_check_box_black_24dp};
public List<tItem> gettaskdata(){
List<tItem> t = new ArrayList<>();
for (int x=0;x<task0.length;x++){
tItem i = new tItem();
i.setTasks(task1.get(x));
i.getImageResId(icons[0]);
t.add(i);
}
return t;
}