1import java.time.LocalTime;
2public class LocalTimeExample1 {
3 public static void main(String[] args) {
4 LocalTime time = LocalTime.now();
5 System.out.println(time);
6 }
7}
1import java.time.LocalTime;
2public class LocalTimeExample4 {
3 public static void main(String[] args) {
4 LocalTime time1 = LocalTime.of(10,43,12);
5 System.out.println(time1);
6 LocalTime time2=time1.plusHours(4);
7 LocalTime time3=time2.plusMinutes(18);
8 System.out.println(time3);
9 }
10}