本帖最后由 仲伟 于 2013-5-13 19:08 编辑
- package com.itcast.simple1;
- import java.util.Calendar;
- import java.util.Date;
- import java.util.Iterator;
- public class Test1 {
- /**
- * @param args
- */
- public static void main(String[] args) {
-
- Calendar now = Calendar.getInstance();
- Date date = new Date();
- System.out.println(now.getTime().getTime()==date.getTime());
-
- }
- }
- //为什么返回是false
- //她们相差一毫秒】、
- //你多运行几次试试,有false的时候啊
- //本人就是菜鸟
复制代码 |
|