fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.text.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Date date = new Date();
  10. Calendar cal = Calendar.getInstance();
  11. cal.setTime(date);
  12. cal.set(Calendar.HOUR_OF_DAY, 6);
  13. cal.set(Calendar.MINUTE, 0);
  14. cal.add(Calendar.MINUTE, 65);
  15.  
  16. DateFormat df = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
  17. df.setTimeZone(TimeZone.getTimeZone("GMT"));
  18.  
  19. String time = df.format(cal.getTime());
  20.  
  21. System.out.println(time);
  22. }
  23. }
Success #stdin #stdout 0.04s 246080KB
stdin
Standard input is empty
stdout
07:05