📜  本地时间 java 代码示例

📅  最后修改于: 2022-03-11 14:52:08.259000             🧑  作者: Mango

代码示例2
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);  
  }  
}