java.time.LocalTime.with(TemporalField field, long newValue)


java.time.LocalTime.with(TemporalField field, long newValue)

package com.codingdict;

import java.time.LocalTime;
import java.time.temporal.ChronoField;

public class LocalTimeDemo {
   public static void main(String[] args) {

      LocalTime date = LocalTime.parse("10:15:30");
      LocalTime result = date.with(ChronoField.HOUR_OF_DAY,13);
      System.out.println(result);  
   }
}