StaticOuter.java
package com.inner;
public class StaticOuter {
private String s="tt";
private static String y="yr";
static class StaticInner{
private String s="tt";
private static String y="ff";
void test()
{
System.out.println("1111 "+s);
System.out.println("22222 "+y);
System.out.println("33333 "+StaticOuter.y);
}
}
}
StaticTestOuter.java
package com.inner;
public class StaticTestOuter {
public static void main(String[] args) {
StaticOuter.StaticInner ss=new StaticOuter.StaticInner();
ss.test();
}
}
No comments:
Post a Comment