Month maxLength()
gets the maximum length of this month in days.
maxLength
has the following syntax.
public int maxLength()
The following example shows how to use maxLength
.
import java.time.LocalDate; import java.time.Month; //from w w w . ja v a 2s. c om public class Main { public static void main(String[] args) { Month m = Month.from(LocalDate.now()); System.out.println(m.maxLength()); } }
The code above generates the following result.