how to calculate time in a program in java code example Example: calculate time java System.out.println(LocalTime.now());