aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Empty file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Empty file" Watch "Empty file" New topic
Author

Empty file

Jay Kay
Ranch Hand

Joined: May 17, 2001
Posts: 58
Any empty file is a valid source file. How come? How can it be a valid source file if I cannot compile it.
Any help is greatly appreciated.
-Jay
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Jay,
An empty file can always be compiled. It will produce no errors because there is no code to generate any!
An empty file, however will not generate a class file so it can not be exectued.
Regards,
Manfred.
Jay Kay
Ranch Hand

Joined: May 17, 2001
Posts: 58
Thanks Manfred.
Jay Kay
Ranch Hand

Joined: May 17, 2001
Posts: 58
One more doubt:
So a source file is one which can be compiled but not be executed?
Thanks.
-Jay
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
Jay,
you can execute a public class declared in a source file. The source file name must be classname.java
Dan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Empty file