首页 > 编程 > Java > 正文

java笔记

2019-11-11 05:21:30
字体:
来源:转载
供稿:网友

1、错误:No enclosing instance of type mPRogram is accessible. Must qualify the allocation with an enclosing instance of type mProgram

在public static void main(String[] args)中调用了内部非静态类,解决方法是将该内部类移到类外,由于一个文件中不能有两个public类,故此类不能以public开头。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表