Search:

Type: Posts; User: waarten

Search: Search took 0.33 seconds.

  1. Replies
    18
    Views
    854

    Re: Cannot find symbol

    omgeving has a size of 3, Wereld has a size of 10

    why cant i copy the 9 cels of Wereld to omgeving? 3 by 3 is 9 cels, right?
  2. Replies
    18
    Views
    854

    Re: Cannot find symbol

    omgeving[i][j] where i and j are 0, 1 or 2 (so size 3?)
    it's empty till the cel's of Wereld[][] are linked to it.

    Wereld[][] is has the size of nrrijen (number of rows) and nrkolommen (number of...
  3. Replies
    18
    Views
    854

    Re: Cannot find symbol

    Get another error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at Ecosysteem.run(Ecosysteem.java:169)
    at Ecosysteem.main(Ecosysteem.java:273)

    about...
  4. Replies
    18
    Views
    854

    Re: Cannot find symbol

    Fixed it with adding Wereld[rij][kolom] != null to the if statement.
  5. Replies
    18
    Views
    854

    Re: Cannot find symbol

    It could. I created a field (nrrijen by nrkolommen) were a number of rabbits (konijn) and foxes (vos) are randomly placed, so some cels stay empty.
  6. Replies
    18
    Views
    854

    Re: Cannot find symbol

    This was exactly what was going on, thanks for helping.

    I've done a lot of work on it and now I'm getting my next error:
    Exception in thread "main" java.lang.NullPointerException
    at...
  7. Replies
    18
    Views
    854

    Re: Cannot find symbol

    File structue:
    Idier.java - This is the interface for the animals
    Dier.java - implements the IDier interface (dier = animal)
    Konijn.java - extends Dier.java (konijn = rabbit)
    Vos.java - extends...
  8. Replies
    18
    Views
    854

    Re: Cannot find symbol

    As far as I know, none of the class's are in a package.


    The assignment gives the IDier.java and IEcosystem.java files (can't make any changes to them) and the other files must be created by the...
  9. Replies
    18
    Views
    854

    Re: Cannot find symbol

    isKonijn and isVos are defined in Konijn.java and Vos.java:

    The beginning of Konijn.java:
    class Konijn extends Dier {

    boolean isKonijn;

    /**
    * Deze...
  10. Replies
    18
    Views
    854

    Cannot find symbol

    hi,

    I i'm writing some code code for a school assignment, but I get stuck at a cannot find symbol error:


    javac *.java
    Ecosysteem.java:34: cannot find symbol
    symbol : variable isKonijn...
Results 1 to 10 of 10