MonthDay of(int month, int dayOfMonth)
creates
an instance of MonthDay.
of
has the following syntax.
public static MonthDay of(int month, int dayOfMonth)
The following example shows how to use of
.
import java.time.MonthDay; // ww w . java 2s . c o m public class Main { public static void main(String[] args) { MonthDay m = MonthDay.of(1,21); System.out.println(m); } }
The code above generates the following result.