package com.collection;
import java.util.ArrayList;
import java.util.List;
public class ListTest {
public List BookToSelesct;
public ListTest(){
this.BookToSelect=new ArrayList();
}
}
刚写到这编译器就报错了,求原因??
亲,你上面两个“BookToSelect”长得不一样啊~
public class ListTest { public List BookToSelesct; public ListTest(){ // this.BookToSelect=new ArrayList(); // 前面声明的是BookToSelesct,此处创建也应是BookToSelesct. this.BookToSelesct = new ArrayList(); } }
求采纳!