When I compiled an empty Java file it didn’t produce any class file. So I want to know how compiler react when compiling an empty Java file? I thought it should generate an empty class file in this case, but it did not. So why it didn’t?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
javacstarts, sees there is no class declared in the file, and finishes. In order for a.classfile to be created you must at least have the class declaration in the file.