I have an arraylist is of a class type “checker”, that stores different objects (float, string etc).
ArrayList<checker> VecAtoms;
checker aux=new checker();
aux.atom="C";
aux.x=0f;
aux.y=0f;
aux.z=0f;
VecAtoms.add(aux);
At this point (VecAtoms.add(aux);) Java asks to switch to debug mode, but no erros is shown in the console, nor any detail that could help me figure out what happens. How should I solve that?
ArrayList<checker> VecAtoms;is pointing to null.You are operating on
nullreference which results inNullPointerException.Have your arraylist instantiated, example:
as well as make sure aux is not pointing to
null.