// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.*;
import java.text.*;

public class TimeAdd {
   private final static DateFormat df = new SimpleDateFormat("HH:mm:ss");
   private static String timeAdd(String t1, String t2) throws ParseException {
      return df.format(new Date(df.parse(t1).getTime() +
                                df.parse(t2).getTime() +
                                Calendar.getInstance().getTimeZone().getRawOffset()));
   }
   public static void main(String[] args) throws Exception {
      System.out.println(timeAdd("00:35:35", "00:45:30"));
      System.out.println(timeAdd("01:35:35", "02:45:30"));
   }
}
