Need help, first time java programming (in BlueJ)

sman789

Banned
May 6, 2003
1,038
0
0
here's the bulk of my program
Text
and when i run it it gives me a java.lang.StackOverflowError which i've searched to mean its recurses too much
it also highlights my forward command when it lists the error

where am i going wrong?
 

ClueLis

Platinum Member
Jul 2, 2003
2,269
0
0
I think I see your problem. Basically, once the bot checks to the right and finds a path, it goes into a new forward method. But when it finishes, it still has to deal with the original method. Also, the bot will turn left when it reaches a dead end no matter what, which may be bad. I would suggest having a "checkLeft()" method.