The errors that are reported by the Java compiler can sometimes be hard to understand. Eventually you will get used to interpreting these errors, but here are some of the most common, along with an explanation of what they mean. Note that the numbers refer to the line number of the code; here they are just for examples, but if you see an error with a line number, look at that line to try to fix the problem. Two other things to note about compilation errors: 1. If you get a whole bunch of errors, sometime fixing the first error will make the others go away. So always start at the top (with the first error) and try to address that one before looking at the others. 2. You may find that fixing an error causes more errors to appear. That is because the compiler makes two passes through the code, and looks for different things each time. So don't despair if you fix something and other errors appear. ---------------------------------------------------------------------------- Calc.java:7: class Calculator is public, should be declared in a file named Calculator.java public class Calculator ^ This means that the name of the class does not match the name of the file. Remember, they MUST be the same, including capitalization! ---------------------------------------------------------------------------- Calculator.java:13: cannot find symbol symbol : class Scanner location: class Calculator Scanner scan = new Scanner(System.in); ^ Any error that starts "cannot find symbol" means that the compiler doesn't know what that symbol (which can be a variable or a class name) refers to. In the second line of the error, where it says "symbol: class Scanner", that indicates that it doesn't know what the Scanner class is. This probably means that you forgot to include the line "import java.util.Scanner;" at the top of the file. ---------------------------------------------------------------------------- Calculator.java:13: cannot find symbol symbol : constructor Scanner() location: class java.util.Scanner Scanner scan = new Scanner(); ^ Again we see an error that says "cannot find symbol". This time, it is "constructor Scanner()". We will see what a constructor is later on, but in this case it probably means that you forgot to put "System.in" inside the parentheses. ---------------------------------------------------------------------------- Calculator.java:14: ';' expected ^ This error message is slightly deceiving. Clearly it means that you forgot a semicolon. However, it tells you that the error is on line 14. But that is not correct! The forgotten semicolon actually belongs on the PREVIOUS line, which would be line 13 in this case. Don't ask why... ---------------------------------------------------------------------------- Calculator.java:19: cannot find symbol symbol : method nextdouble() location: class java.util.Scanner double x = scan.nextdouble(); ^ Yet another "cannot find symbol" error. Here it doesn't know "method nextdouble()". Can you guess why? Because it should be "nextDouble", with a capital D. Be very careful about capitalization! ---------------------------------------------------------------------------- Calculator.java:29: ')' expected System.out.println("The sum is " sum); ^ In this case, the error is a bit misleading because it says that a right parenthesis is expected. However, as you can see, the error is actually that you need a plus sign between the two things you are concatenating. ---------------------------------------------------------------------------- Calculator.java:45: '}' expected } ^ This probably means that you forgot a curly brace somewhere. The easiest way to avoid this is to vertically line up the left and right curly braces and indent accordingly. ---------------------------------------------------------------------------- This is by no means an exhaustive list but it should hopefully help you out!!