Answers for "localtime in java"

1

java localtime

import java.time.LocalTime;  
public class LocalTimeExample1 {  
  public static void main(String[] args) {  
    LocalTime time = LocalTime.now();  
    System.out.println(time);  
  }  
}
Posted by: Guest on June-20-2021
0

localtime java

import java.time.LocalTime;  
public class LocalTimeExample4 {  
  public static void main(String[] args) {  
    LocalTime time1 = LocalTime.of(10,43,12);  
    System.out.println(time1);  
    LocalTime time2=time1.plusHours(4);  
    LocalTime time3=time2.plusMinutes(18);  
    System.out.println(time3);  
  }  
}
Posted by: Guest on July-09-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language