The reason you’re getting this error is because you didn’t save the class into a file called Hello.java (case-sensitive!)
This is just problem of intellij IDE.
Solution Steps:
CtrlShiftAlts -> Preject Setting -> modules tab -> expand
refer Image:
In Sources tab -> ** click on x symbol**
click YES
Right click on -> sources
Apply and OK
Finally build your project.
Enjoy.