What it might be is that your class is not declared public but your main method is. You cannot have a larger scope for an enclosed method than the scope of the class itself, and classes are -- by default -- package-private. Try adding public before class and see if that helps.
In Java, each *.java file should contain a single class which is declared public, otherwise it cannot be accessed outside of the file in which it is defined (it's basically unreachable).
Thank you for your advice!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.