I’m just learning Java and trying to have an array of a class. When a call a methed from the array it crashes. Works fine if it is not an array
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
cDate test=new cDate();
test.setDay(0);
mAppoitments = new cDate[24];
// crashes why?????
mAppoitments[0].setDay(0);