Steve-
(1) Exactly. Also, even if you don't make the class instance available outside the package - if you wan to implement an interface such as Runnable for
any reason, the interface methods have to be declared public or the compiler will balk. Even if you know they will only ever be used inside the current package, you still can't make the method less public than its initial declaration. (And note that interface methods are
always implicitly public.)
(2) Right - not unless you are attempting to access the inner class from the same package. Or unless you provide an access method to get at an
instance of the class as I showed - but the other packages still don't know anything about the inner class, only the public interface.
(3) They're inherited, yes (though if an inner class is private, you can't access it from subclasses). But they
are subclassable from anywhere in the scope of the inner class. The only kind of nested class that isn't subclassable is an anonymous class, since there's no way to say what you're extending. (Who knows, there may even be a way to do that using reflection - but never mind that.) You don't see it done very often, as usually if a class is useful enough to bother extending, it's useful enough to make public so you can use it elsewhere. But in principle there's no reason you can't do it:
<code><pre> public void method() {
class LocalBase {}
class LocalSub extends LocalBase {}
}</pre></code>
I can't think of a good example offhand where it's actually useful. Maybe for static nested classes I suppose...
P.S. But I implemented Runnable, not Thread. So a new thread would be <code>new Thread(r).start()</code>. I was just constructing a minimal example though - it's not like the program was doing anything useful anyway.