java学习笔记
qing_feng__
学生ing
展开
-
构造器
package com; public class Person { int id; int age; Person(int _id,int _age)//构造方法与类同名,但是没返回值,(int ,void ......都不行) { id = _id; age = _age; } public static void main(String[] args)原创 2016-10-15 17:18:22 · 186 阅读 · 0 评论 -
No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing instanc
java : No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing instance of type E(e.g. x.new A() where x is an instance of E). E指代那个内部类。 根据提示,没有可访问的内部类E的实原创 2016-11-25 17:56:09 · 426 阅读 · 0 评论