![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java code practice
YannFoo
IT 一族
展开
-
jdk 1.6LinkedList+iterator 举例
package com.itcast.practice; import java.util.Iterator;import java.util.LinkedList; public class test1 { /** * 1、 创建一个类Sample,在main方法中定义一个ArrayList的集合类, 并向集合中添加任意多个同一种类型的元素, * 利用Iterator接口,遍历...2013-06-14 23:31:15 · 122 阅读 · 0 评论 -
java 排序算法实现
int[] arr = { 2, 7, 33, 22, 83, 21, 200, 53, 332 }; int temp, i, j; /** * 冒泡排序 * * @param args */ for (i = arr.length - 1; i >= 0; i--) { for (j = 0; j < i; j++) {// j&...2013-06-15 23:21:43 · 104 阅读 · 0 评论 -
treeset+Comparator 实现排序举例
定义student 实体类,并重写compareTo() 方法。 package com.xxxx.practicetest; public class Student implements Comparable { /** * 定义一个学生类, 需要有姓名, 年龄, 考试成绩三个成员属性 * 构造bean,需要实现Comparable接口,并重写compareTo()方法,c...2013-06-16 23:44:46 · 185 阅读 · 0 评论 -
日期与时间处理
格式1:2009-12-25 11:57:36 private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日"); string(2009-12-25 11:57:36) trans_date = Timestamp.valueOf(HTML.analysis_value...2013-09-30 10:10:35 · 126 阅读 · 0 评论