/*
返回值类型
基本类型(简单)
引用类型:
类:返回的是该类的对象
抽象类:
接口:
*/
class Student{
public void study(){
System.out.println("Good Good study,Day Day Up");
}
}

class StudentDemo{
public Student getStudent(){
//Student s = new Student();
//Student ss = s;

//Student s = new Student();
//return s;
return new Student();
}
}

class StudentTest2{
public static void main(String[] args){
//需求:我要使用Student类中的study()方法
//但是,这一次不要直接建对象
//让StudetnDemo帮你创对象
StudentDemo sd = new StudentDemo();
Student s = sd.getStudent();//new Student(); Student s = new Student();
s.study();
}
}