📄 newlist.java
字号:
import java.util.*;
class NewList<Double>
{
//创建新的List集合类型对象list,使其存储内容都Double类型数据
public List<Double> list = new LinkedList<Double>();
//方法过载:向LinkedList中添加数据
public void add(Double d)
{
list.add(d);
}
//方法过载:获取LinkedList中index指定位置的数据
public Double get(int index)
{
return list.get(index);
}
//方法过载:获取Iterator对象
public Iterator<Double> iterator()
{
return list.iterator();
}
//方法过载:移除LinkedList中index指定位置的数据
public Double remove(int index)
{
return list.remove(index);
}
//方法过载:设置LinkedList中index指定位置的数据
public Double set(int index,Double d)
{
return list.set(index,d);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -