LocalDate ofYearDay(int year, int dayOfYear) example
Description
LocalDate ofYearDay(int year, int dayOfYear)
creates an instance
of LocalDate from a year and day-of-year.
Syntax
ofYearDay
has the following syntax.
public static LocalDate ofYearDay(int year, int dayOfYear)
Example
The following example shows how to use ofYearDay
.
import java.time.LocalDate;
/* w ww .jav a 2s. c om*/
public class Main {
public static void main(String[] args) {
LocalDate a = LocalDate.ofYearDay(2014,10);
System.out.println(a);
}
}
The code above generates the following result.