A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© SLJ_920808 中级黑马   /  2014-7-9 23:43  /  1192 人查看  /  2 人回复  /   0 人收藏 转载请遵从CC协议 禁止商业使用本文

如何在外部其他类中直接访问static内部类的非静态成员?

2 个回复

倒序浏览
Out外部类,In内部类,function内部类方法——new Out.In().function();
回复 使用道具 举报
public class Demo28 {

        /**
         * @param args
         */
        public static void main(String[] args) {
                 new outer112.inner().show() ;
         

        }

}
class outer112{
        static class inner{
                public void show(){
                        System.out.println("00");
                }
        }
}
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马