Java LocalDateTime create from 'of' factory as of(2020, 5, 2, 15, 30)

Description

Java LocalDateTime create from 'of' factory as of(2020, 5, 2, 15, 30)

import java.time.LocalDateTime;

public class Main {
  public static void main(String[] args) {
    LocalDateTime ldt = LocalDateTime.of(2020, 5, 2, 15, 30); // 2020-05-02T15:30
    System.out.println(ldt);/* ww  w.  ja  v  a  2 s .  c  o m*/
  }
}



PreviousNext

Related