
java基础
Peng Peng
从菜鸟走向大神
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
获取项目或类绝对路径的几种方式
一 获取类路径 1 java.io.File f = new java.io.File(this.getClass().getResource("/").getPath()); System.out.println(" path1 = " + f.getAbsolutePath()); 2 URL xmlpath = this.getClass().getClassLoad...原创 2020-04-15 21:56:42 · 348 阅读 · 0 评论 -
java—集合Collection
java基础——集合Collection一、 Collection的子接口二、 集合的遍历三、 增强for循环 一、 Collection的子接口 从图中我们可以看到接口List和Set都是Collect的子接口。 Collection中定义的方法主要有: public boolean add(E e): 把给定的对象添加到当前集合中 。 public void clear() :清空集合中...原创 2019-08-09 16:06:07 · 131 阅读 · 0 评论