If your javac command (the line that read "javac hello.java") compiled the
source code with no errors, then
a file named hello.class was created in the directory you ran it from.
If the java command (the line that read "java hello") gives the error you
mention, it means that the java executable can not find the file hello.class.
Running the command "set" will reveal if you have a CLASSPATH environment
variable set and what it is set to.
You can also specify a classpath when you run the java executable with a
classpath switch in several ways:
java -classpath "C:\" hello
or
java -classpath %CLASSPATH%;"." hello