public class OuterClass{
private double d1=1.0;
static class InnerOne{
double methoda(){
return new OuterClass().d1; //is it wrong?
}
}
public static void main(
String args[]){
InnerOne myclass=new InnerOne();
System.out.println(myclass.methoda());
}
}
the result: it can run and get the answer 1.0