Java Tutorial is a good place to learn Java.
And after getting used to the language, I recommend using some advanced IDE like Eclipse. All the errors above would be automatically corrected by pressing Ctrl-Shift-O.