MonthDay of(Month month, int dayOfMonth) example
Description
MonthDay of(Month month, int dayOfMonth)
creates an instance of MonthDay.
Syntax
of
has the following syntax.
public static MonthDay of(Month month, int dayOfMonth)
Example
The following example shows how to use of
.
import java.time.Month;
import java.time.MonthDay;
/*from w w w . j av a2s.c o m*/
public class Main {
public static void main(String[] args) {
MonthDay m = MonthDay.of(Month.MARCH,21);
System.out.println(m);
}
}
The code above generates the following result.