This site requires JavaScript, please enable it in your browser!
Greenfoot back
youresocool
youresocool wrote ...

2014/4/8

I keep on getting "can't find symbol" error on the "Cansee(fly.class) ))"

youresocool youresocool

2014/4/8

#
public void lookForfly() { if ( (Cansee(fly.class) )) { eat(fly.class); Greenfoot.stop(); }
danpost danpost

2014/4/8

#
Unless you wrote or added the 'Cansee' method to your class (or a superclass of that class) yourself, you will get that error. There is a 'canSee' method in the Animal class (lettercase is important). If this class extends that class than use 'canSee' (not 'Cansee'). If not then, you need to either add the Animal class and have this class extend it, or add the methods to this class to do what you want.
You need to login to post a reply.