最新回答 / 慕仰020268
public void show() { System.out.println("外部类中的name:" + HelloWorld.this.name ); System.out.println("内部类中的name:" + this.name ); System.out.println("外部类中的age:" + HelloWorld.this.age); }这样改一下就不报错了
2017-07-19
最新回答 / 翊飞4260358
System.out.println("访问外部类中的score:" + new HelloWorld().score );<...code...>
2017-07-19
答案我写在博客上了,欢迎来访共同探讨!
http://www.nightsong.cc/index.php/post/198.html
http://www.nightsong.cc/index.php/post/198.html
2017-07-19
// 创建方法内部类的对象
MInner m = new MInner();
// 调用内部类的方法
//m.getScore();
System.out.println("姓名:" + name + "\n加分后的成绩:" + m.getScore() );
MInner m = new MInner();
// 调用内部类的方法
//m.getScore();
System.out.println("姓名:" + name + "\n加分后的成绩:" + m.getScore() );
2017-07-19
已采纳回答 / qq__6307
package com.zuche;import java.util.*;public class Initial { public static void main(String[] args) { // TODO Auto-generated method stub CarProperty huo1=new HuoChe("1,奥迪", "货车", 2, 3, 100); CarProperty huo2=new HuoChe("2,奥拓", "货车", 2, 2, ...
2017-07-18
课后习题 实战 小弟写的答案。各位大佬看看哈
http://www.nightsong.cc/index.php/post/197.html
http://www.nightsong.cc/index.php/post/197.html
2017-07-18
小弟用记事本和cmd写的答案
http://www.nightsong.cc/index.php/post/196.html
http://www.nightsong.cc/index.php/post/196.html
2017-07-18