首页 > 试题广场 >

阅读以下程序,写出输出结果。

[问答题]

阅读以下程序,写出输出结果。

public class GroupThree {
private static int count; 
private String name; 
 
public class Student {
 
private int count; 
private String name; 
 
public void Output(int count) {
count++; 
this.count++; 
GroupThree.count++; 
GroupThree.this.count++; 
System.out.println(count + " " + this.count + " " + GroupThree.count	+ " " + GroupThree.this.count++);
}
}
 
public Student aStu()
{
return new Student();
}
 
public static void main(String args[]) {
 
GroupThree g3 = new GroupThree();
g3.count = 10; 
GroupThree.Student s1 = g3.aStu();
GroupThree.Student s1.Output(5);
}
}

发表于 2017-08-25 20:12:09 回复(0)

6 1 12 12

发表于 2017-05-17 16:17:59 回复(1)