MonthDay now(ZoneId zone) example
Description
MonthDay now(ZoneId zone)
creates the current month-day
from the system clock in the specified time-zone.
Syntax
now
has the following syntax.
public static MonthDay now(ZoneId zone)
Example
The following example shows how to use now
.
import java.time.MonthDay;
import java.time.ZoneId;
/*from w w w. ja v a2 s . c o m*/
public class Main {
public static void main(String[] args) {
MonthDay m = MonthDay.now(ZoneId.systemDefault());
System.out.println(m);
}
}
The code above generates the following result.