Is an empty file allowed to compile?
Before the compiler starts processing a file, it does not know its content. An empty file does not contain any error, like a file with only comments. But such a file does not produce a class file.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes