java localtime

Solutions on MaxInterview for java localtime by the best coders in the world

showing results for - "java localtime"
Rebeca
10 Feb 2019
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}  
Jakob
21 Sep 2019
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}