L
lyallex
Hello
I have the following interface in my working directory (C:\java>)
public interface Foo {
public void doSomething();
}
As you can see, there is no expicit package definition so this class is
in the default package. Why do I want to do this ? well it's part of an
exploration of classloading and the classloader architecture and for the
fist time in I don't know how many years I'm working on the command line
without Eclipse to tell me when I did something stupid.
To cut a long story short I wanted to refer to this interface in a
packaged class and I can't because you can't apparently use classes in
the default package from within a named package.
I'm trying to understand why this is but I'm not getting too far, I'm
sure I did know it once, a long time ago but I've sure forgoten it now.
Why can't you use classes in the default package from within a named
package.
Thanks
I have the following interface in my working directory (C:\java>)
public interface Foo {
public void doSomething();
}
As you can see, there is no expicit package definition so this class is
in the default package. Why do I want to do this ? well it's part of an
exploration of classloading and the classloader architecture and for the
fist time in I don't know how many years I'm working on the command line
without Eclipse to tell me when I did something stupid.
To cut a long story short I wanted to refer to this interface in a
packaged class and I can't because you can't apparently use classes in
the default package from within a named package.
I'm trying to understand why this is but I'm not getting too far, I'm
sure I did know it once, a long time ago but I've sure forgoten it now.
Why can't you use classes in the default package from within a named
package.
Thanks