When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.
Janeice DelVecchio wrote:It's not the syntax.... there's a concept here you're missing.
I'll bet on line 11 you're getting a compiler error. If you stop outputting y (or try to output on 2 lines), x's value will be 5 at line 11.
Why? Scope. Not the mouthwash.
Anything that gets declared INSIDE something (method, loop, etc) falls out of scope (and dies) once that something goes away.
Given that hint, let's see if you can fix it.... post back more code.
.... what? you didn't think I'd make it easy?
EDIT: and you should start off learning without Eclipse. You'll find it easier, retain more, and really understand what you're doing.... just my 2 cents.
When you do things right, people won't be sure you've done anything at all.
Janeice DelVecchio wrote:Ahhh.... a duplicate local variable.... what could that possibly mean?
More than one of the same variable inside some scope, somewhere..... sounds like a problem.
After all, if there's two people with the same name, how would you tell them apart?
When you do things right, people won't be sure you've done anything at all.
Avery Jenkins wrote:
You're going to be fun to work with, I can tell.
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.