Java Data Type How to - Create date from year, month and day of month


We would like to know how to create date from year, month and day of month.


import java.time.LocalDate;
import java.time.Month;
/* ww w .ja v  a 2s  . co  m*/
public class Main {

  public static void main(String[] args) {
    int year = 2014;
    Month month = Month.JULY;
    int dayOfMonth = 14;
    LocalDate jugILThisYear = LocalDate.of(year, month, dayOfMonth);


The code above generates the following result.