Originally posted by Douglas Wolfinger:
Hi,
I'm having problems creating a package. Here is my interface that creates the package. (Btw, I ran Console.java in ch13 of Thinking in Java, and my compiler doesn't recognize the com.bruceeckel.swing package created by that program.)
package java.doug;
public interface Inter {
float f = 0.0f;
void interMeth();
void interMeth2();
public int interMeth3(int a);
}
and here is the class that implements it...
import java.doug;
class InterClass implements Inter {
public void interMeth() {
System.out.println(f);
}
public void interMeth2() {
double d = f + -6.5;
System.out.println(d);
}
public synchronized int interMeth3(int b) {
System.out.println(b);
return b;
}
public static void main(String args[]) {
InterClass ic = new InterClass();
ic.interMeth();
ic.interMeth2();
ic.interMeth3(5);
}
}
// }
class IClass2 extends InterClass {
public static void main(String args[]) {
InterClass ic2 = new InterClass();
}
}
The compiler complains that it doesn't find the package name (cannot resolve symbol).
Any help is greatly appreciated. Thanks, Doug