In
Java, all code must be inside a method (OK, there are a few exceptions, but since you are a beginner, we'll ignore those), and all methods must be inside a class.
You have the class defined, but no methods, and a bunch of executable statements. That won't work. The first thing
you should do is create a main method.
But let's back up even further. You should never have gotten this far. I've been writing java code for about 10 years, and I never NEVER write more than 2-3 lines before I recompile, debug, and
test.
Seriously.
That way, you know exactly where the problem is going to be, and you don't get 100+ errors and get discouraged.
I took your code, wrapped it in a main method, and re-compiled.
You're missing a semi-colon on one line, so i fixed that...and got 11 errors, because you are missing some import statements.
My point is, you would probably do better to almost start over. EVERY SINGLE TIME I start a new project, my code looks something like this the first time I compile:
Even just now, when I attempted to compile your code, I did this first, and discovered I had typed "statis" instead of "static" on my main method, giving me an error. But since I had only a few lines of code, it was easy to find and correct. Then I pasted your code inside my main method (taking out my println), and recompiled.
If I really wanted to do it, right, I would only and 1-2 lines of your code at a time and recompile after each, fixing errors as I go.