SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Dominic Griffin wrote:I believed I was at a point in my program where it would execute. When I compile it I get 2 error messages
')' expected - line 100
<identifier> expected - line 99
I was expecting the dialog boxes to appear and begin asking for information to be enterd.
SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
Dominic Griffin wrote:What do you mean when you say no method exists for totalCost ()?
SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
W. Joe Smith wrote:
Also, how are you compiling this program, and with what version of the JDK? I just compiled it on 1.6.0_11 on the command prompt and had 38 errors.
EDIT: I dropped it to 6 once I removed the comma last comma here:
The comma after c1 shouldn't be there.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:The single most important piece of advice I give new programmers is this:
WHATEVER YOU DO, no matter how simple, easy, or trivial your program is, DO NOT WRITE MORE THAN 5 LINES OF CODE BEFORE YOU COMPILE/TEST/DEBUG.
Heck, I'd say the LESS you write before going through this cycle, the better. If I assume the original 100 lines of code you posted were all written before you ever compiled anything, you're in for a world of self-induced pain.
If you only write one line and re-compile, you know exactly which line has the error. if you only write one line and test, and find a new bug, you know something about the one line is causing (or revealing) the bug.
for your own sanity, get in the habit of compiling as often as you can NOW.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |