java_内部类的使用方法:

2019年2月16日12:24:56 发表评论 1,080 views

发现个好东西: 一个免费短链生成项目:“ https://www.isok.co”一个可以生成所有短链的服务,isok.co的这个含义能覆盖所有短链含义isok, 我试过了很不错,都可以试试

/**
 * Created by xabcd on 2019/2/16.
 */
public class java_outer
{
    int score = 95;
    void inst()
    {
        Inner in = new Inner();
        in.display();
    }
    class Inner
    {
        void display()
        {
            System.out.println("成绩:score="+score);
        }
    }
}




/**
 * Created by xabcd on 2019/2/16.
 */
public class test_outer
{
    public static void main(String[] args)
    {
        java_outer ou = new java_outer();
                ou.inst();
    }
}



成绩:score=95

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: