Bernd,
<quote>
When you create an inner class from outside the enclosing class OR from within <i>a static method </i>- you need to use InnerDemo.Mythread m = ..
</quote>
you dont need use InnerDemo.Mythread m=... in a static method as long as it is IN the enclosing class. the following example works fine:
<code>
class Test1{
class A{
final static int a=0;
final int getI(){return a;}
}
private static void main(
String[] args){
//A a = new Test1().new A();
//A a = new Test1().getA();
A a = getA();
System.out.println("a = " + a);
}
public static A getA(){
A a = new Test1().new A();
return a;
}
}
</code>