• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is empty file valid source file???.

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic