isLenient(): This method is available in java.util.GregorianCalendar class of Java.
Syntax:
boolean java.util.Calendar.isLenient()
This method tells whether date/time interpretation is to be lenient.
Parameters: NA
Returns: true if the interpretation mode of this calendar is lenient; false otherwise.
Exceptions: NA
Approach
Java
import java.util.GregorianCalendar;public class GregorianCalendarisLenient {public static void main(String[] args) {GregorianCalendar cal = new GregorianCalendar();System.out.println(cal.isLenient());}}
Output:
true
No comments:
Post a Comment