标题: 有点迷糊了 [打印本页] 作者: 陈俊洁 时间: 2016-3-15 19:45 标题: 有点迷糊了 class Student {
public void study() {
System.out.println("Good Good Study,Day Day Up");
}
}
class StudentDemo {
public Student getStudent() {
return new Student();
}
}
class StudentTest2 {
public static void main(String[] args) {
StudentDemo sd = new StudentDemo();
Student s = sd.getStudent(); //new Student(); Student s = new Student();
s.study();