It's not a secret anymore!
The moose likes Beginning Java and the fly likes stuck on a problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "stuck on a problem" Watch "stuck on a problem" New topic

stuck on a problem

Lee Kerns

Joined: Dec 21, 2012
Posts: 2
Hey guys, I have decided to learn Java on my own so I have been watching Stanford cs lectures and trying to do their problem sets.

I'm stuck on problem 3 problem set

I have been following this hand out. You can just look at the last page and see what SuperKarel is capable of.

So far this is all I have:

the code works fine but I got this error

Any code that I write after the while loop didn't get processed?

Kathleen Angeles
Ranch Hand

Joined: Aug 06, 2012
Posts: 123

What 'error' were you referring to?

The yellow warnings (which in this case is about ~serializable) is just a warning. It didnt have any effect whatsoever in your java compilation nor the execution of your program.

It does look like the codes after the while is executed. That is why you get that '...blocked' red pop up. That is part of that 'game' design.


Lee Kerns

Joined: Dec 21, 2012
Posts: 2
Thanks for the reply.

Oh nvm the error.

If the codes after the while are executed, wouldn't the robot's position be at (8,2) instead of (8,1)?
I agree. Here's the link:
subject: stuck on a problem
It's not a secret anymore!