java 时间处理

public class TestTime {
public static void main(String[] args){
Time t=  new Time(12,12,1);
Time t1=  new Time(11,12,1);
System.out.println(t.getTime());
System.out.println(t1.getTime());
for(long k=t1.getTime();k<t.getTime();k=k+10*60*1000){
Time t2= new Time(k);
System.out.println(t2.getHours()+":"+t2.getMinutes()+":"+t2.getSeconds());
if(t.getTime()-k<10*60*1000){
System.out.println(t.getHours()+":"+t.getMinutes()+":"+t.getSeconds());
}
}
}
}

你可能感兴趣的:(java)