LocalTime withMinute(int minute)
returns a copy of this LocalTime
with the minute-of-hour value altered.
withMinute
has the following syntax.
public LocalTime withMinute(int minute)
The following example shows how to use withMinute
.
import java.time.LocalTime; public class Main { public static void main(String[] args) { LocalTime l = LocalTime.now(); LocalTime s = l.withMinute(34); System.out.println(s); } }
The code above generates the following result.