感觉这个比较简单,你可以看一下,感觉好,给个技术分,我也准备去黑马学习哩,谢谢了!!!
- import java.util.Calendar;
- public class test {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Calendar c=Calendar.getInstance();
- c.set(2004, 2, 18);
- long t1=c.getTimeInMillis();
- c.set(2014, 2,25);
- long t2=c.getTimeInMillis();
- if(t1>t2)
- System.out.println("t1>t2");
- else
- System.out.println("t1<t2");
- }
- }
复制代码
|