aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is empty file valid source 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 "Is empty file valid source file???." Watch "Is empty file valid source file???." New topic
Author

Is empty file valid source file???.

sun ram
Ranch Hand

Joined: Dec 18, 2001
Posts: 61
Hi,
Is empty file valid source file.
for emptry file javac desn't report any error. But it is not generating class file.
Bye
SR


SCSecA,SCNA,SCSA,SCWCD,SCJP
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
en empty source file is valid...
the compiler doesn't generate any class file because there is nothing to generate anyway...
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Originally posted by sun ram:
Hi,
Is empty file valid source file.
for emptry file javac desn't report any error. But it is not generating class file.
Bye
SR

javac converts the java statements (present in source file) into byte code.This code is then saved in seperate file having "class"
extension.An emty java source file contains no statement(sine it is empty), therefore there will be no byte code, & hence no need for seperate "class" file.
Bye.
Viki.

------------------
Count the flowers of ur garden,NOT the leafs which falls away!


Count the flowers of your garden, NOT the leafs which falls away!
Prepare IBM Exam 340 by joining http://groups.yahoo.com/group/IBM340Exam/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is empty file valid source file???.