public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(2.75%0.5);
Date date1=new Date();
Date date2=new Date();
SimpleDateFormat format=new SimpleDateFormat("yy/MM/dd hh:mm:ss");
SimpleDateFormat timeformat=new SimpleDateFormat("hh:mm:ss");
try {
date1=format.parse("12/07/20 08:40:28");
date2=format.parse("12/07/20 08:32:15");
long time1=date1.getTime();
long time2=date2.getTime();
long test=Math.abs(time2-time1);
Date result=new Date();
result.setTime(test);
System.out.println(timeformat.format(result));
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}