wood burning stoves*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Compile with the package statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Compile with the package statement" Watch "Compile with the package statement" New topic

Compile with the package statement

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hello all,
I have 2 questions.
1) How to compile a program with the package statement. I mean when the file is compiled it should go to the correct folder specified by the package decleration.
package abc;
class Cl1 {
package xyz;
import abc.*;
class Cl2 extends Cl2{

If the Cl1 class is not compiled, if you compile the Cl2 java file does it give compiler error saying Cl1 was not compiled or can not find Cl1? or does it compile the base class as well?

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
jQuery in Action, 2nd edition
subject: Compile with the package statement
Similar Threads
Are class objects unique?
Arrays of different implementations of same interface
Multiple EJB deployment
getClass() and enums
TreeSet and compareTo Java 5