John Herkess wrote:Ok ive changed that, but the null pointer exception is still happening. It seems to have a problem with this line in particular:
That's not really your fault. In
java it's currently not possible to create a generic array (List<Course>[] courses = new ArrayList<Course>[10];)
One way to "fix" this is:
@SuppressWarnings("unchecked")
ArrayList<Course>[] myarr = new ArrayList[10];
John Herkess wrote:
But this returned the same error.
If that causes an NPE then timetable is uninitialized or timetable[i] is uninitialized.
Could you post the NPE stacktrace and relevant code (class structure, constructors, initialization blocks)