62,614
社区成员
发帖
与我相关
我的任务
分享
public static void main(String args[]){
public static <E> List<E> dealhand(list<E> deck,int n){ //第一个<E>的原因
int decksize = deck.size();
list<E>handview =deck.sublist(decksize-n,decksize);
list<E>hand =new Arraylist<E> (handview);
handView.clear(); //handview 不是局部变量么,不是会自己释放内存么,为什么还要clear()?
return hand;
}