- class Outer {
- public int num = 10;
- class Inner {
- public int num = 20;
- public void show() {
- int num = 30;
- System.out.println(?);
- System.out.println(?);
- System.out.println(?);
- }
- }
- }
- class InnerClassTest {
- public static void main(String[] args) {
- Outer.Inner oi = new Outer().new Inner();
- oi.show();
- }
- }
复制代码
面试题:
要求请填空分别输出30,20,10。
|
|