java关于ArrayList()的简单问题

package Hope;
import java.util.ArrayList;
import java.util.List;
public class ListTest {
public List coursesToSelec;

/* public ListTest(){
this.coursesToSelect = new ArrayList();
}
*/
coursesToSelect = new ArrayList(); //把上面的内容注释掉,换成这段代码为什么不行?

public void addCourse(){
    Course cr1 = new Course("离散数学",1);
    coursesToSelect.add(cr1);
    Course temp = (Course) coursesToSelect.get(0);
    System.out.println(temp.name+" "+temp.number);

}      

public static void main(String[] args){
    ListTest a = new ListTest();
    a.addCourse();
}

}

package Hope;
public class Course {
String name;
int number;
public Course(String name,int number){
this.name = name;
this.number = number;
}

}

/* public ListTest(){
this.coursesToSelect = new ArrayList();
}
*/
换成这样子么?如果是下面这样子,是可以的啊
public List coursesToSelec = = new ArrayList();