2 Star 0 Fork 0

20165203Enosh / 20165203xyx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Example15_10.java 447 Bytes
一键复制 编辑 原始数据 按行查看 历史
20165203Enosh 提交于 2018-04-08 19:28 . week6
import java.util.*;
public class Example15_10 {
public static void main(String args[]) {
ArrayList<Integer> list=new ArrayList<Integer>();
for(int i=0;i<10;i++) {
list.add(i); //自动装箱,实际添加到list中的是new Integer(i)。
}
for(int k=list.size()-1;k>=0;k--) {
int m=list.get(k); //自动拆箱,获取Integer对象中的int型数据
System.out.printf("%3d",m);
}
}
}
Java
1
https://gitee.com/xyx-nice/20165203xyx.git
git@gitee.com:xyx-nice/20165203xyx.git
xyx-nice
20165203xyx
20165203xyx
master

搜索帮助