• 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

about source file

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, everyone:
I registered one minute ago. Nice to meet you here.
Can anyone give me some explanaition about source file? What is a source file? Is there some relationship between a source file and classes? I always run java programs on JBuilder3. Is .class file a source file?
Thanx.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is my understanding that a source file is a .java file. This is the file where you write your code - top level class declarations have to have the same name as your .java file. When you compile your source file, it generates a corresponding .class file.
[This message has been edited by Pam Doucette (edited March 15, 2001).]
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Wei,
Pam's explanation is correct. A source file is the .java file.
If you don't mind a suggestion ... if you are studying for the SCJP2 Exam it's better to write and compile your code from the command-line vs using an IDE. Most IDE's add or optimize code; possibly correcting syntax errors, etc for you. You really need to see how the pure Java compiler handles things.

------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Popeye has his spinach. I have this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic