Java Date Time - LocalTime NOON example








LocalTime NOON defines the time of noon in the middle of the day, '12:00'.

Syntax

NOON has the following syntax.

public static final LocalTime NOON

Example

The following example shows how to use NOON.

import java.time.LocalTime;

public class Main {
  public static void main(String[] args) {
    LocalTime l = LocalTime.NOON;

    System.out.println(l);
  }
}

The code above generates the following result.