[size=1em]1
[size=1em]2
[size=1em]3
[size=1em]4
[size=1em]5
[size=1em]6
[size=1em]7
[size=1em]8
[size=1em]9
[size=1em]10
[size=1em]11
[size=1em]12
[size=1em]13
[size=1em]14
[size=1em]15
[size=1em]16
[size=1em]17
[size=1em]18
[size=1em]19
[size=1em]20
| [size=1em][size=1em]public class Test1 {
[size=1em] public static void main(String[] args) {
[size=1em] Outer outer=new Outer();
[size=1em] Outer.Inter inter=outer.new Inter();
[size=1em] //然后我要在这里通inter调用外围类对象的
[size=1em] //引用,继而调用外部类的say()方法。该如何?
[size=1em] }
[size=1em]}
[size=1em]class Outer{
[size=1em] public void say(){
[size=1em] System.out.println("外部类的方法调用");
[size=1em] }
[size=1em] class Inter{
[size=1em] public void say(){
[size=1em] System.out.println("内部类的方法调用");
[size=1em] }
[size=1em] }
[size=1em]}
|