Add a println just before the statement where the exception occurs and print out the values of all of the indexes being used. That will show you what the code is doing.
What statement gives a size...
Type: Posts; User: Norm
Add a println just before the statement where the exception occurs and print out the values of all of the indexes being used. That will show you what the code is doing.
What statement gives a size...
Print out the .length of the array to see its size.
You get an ArrayIndexOutOfBoundsException because your index is too big.
You need to know the size of an array to be able to use it.
Where...
What is the size of the array being used on line 169? What is the value of the index used there?
Then you must test if null before using it.
Does Wereld[rij][kolom] have a null value?
Does IDier have definitions for the variables that are not found?
You can only reference variables defined in IDier using the Wereld variable.
Is there a confusion between referencing a...
Seems redundant for a method to be hardcoded to return true. Why would you call a method if you know it will always return true?
What data type is Wereld?
If it is a class, does that class have...
Why can't the compiler see those definitions when it is compiling the Ecosysteem.java file?
Are any of the class's in packages?
Some questions about the code:
Why are there method names with...
The error from the compiler says that the compile can NOT find a defintion for a symbol you have coded in the program. Look at the text of the error message, find the symbol that the compiler is...