Please mark this thread as solved if you are finished with it.
Type: Posts; User: Norm
Please mark this thread as solved if you are finished with it.
If you need help with the errors, copy the full text of the error messages and paste it here.
Ask the compiler. It is usually correct.
"ASDF" is a String literal with the 4 letters: ASDF
Look in post #55 there are a lot of String litterals there with the names of the months in ""s
How does that code compare to yours?
Boy are you lazy. It's in this thread somewhere in earlier posts.
The compiler can not find a definition for the symbol or variable named in the error message.
All variables used in a program MUST be defined so the compiler knows what type they are.
Many of...
Not yet. They are working on it. But for now the programmer has to correct his own errors.
If you need help with the errors, copy the full text of the error messages and paste it here.
Read the tutorial on how to use a switch statement:
The switch Statement (The Java™ Tutorials > Learning the Java Language > Language Basics)
Which post? What did you change?
You've coded the switch statement many times in this thread and have always had a value inside the ()s. This time you left it out and the compiler finds it as an error.
Please edit your post and...
You need to copy the full text of the error messages and paste them here. We're here and you're there. We can't see what is on your PC's screen.
I don't know why you would wait for someone to tell you to compile the program. Compilations are free. I compile frequently when writing a program. Its better to have fewer errors with frequent...
Yes, by source I meant your code before it is compiled.
Print the source and use a pencil to connect a { to its pairing }
Start at the inside and work out.
Not a record, not even close.
How many errors before your last change? Restore the code to the old version and try again.
What does the compiler say?
Please edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting and preserve formatting.
You need to copy and post the full text of error messages.
If you are having problems with mismatched {}s, some IDEs have a tool you can use to find the pairing {}s
On my IDE put the cursor just...
Don't post code before the compiler has seen it.
Make a complete class that will compile and execute, not just pieces of code.
What does that mean? It looks like a copy and paste was done with no editing. A waste of time to copy code from...
Ok, now add some code to the method to start computing the cost. Do it a simple step at a time.
Call the method with a price code String and print out the value of cost that it computes.
When you get to a computer, type in the code and compile it to see what the compiler thinks of it.
See the tutorial: Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
That's not the definition of a method. That would be part of the code that would be used in the method.