isLenient(): This method is available in java.util.Calendar 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.Calendar;public class CalendarisLenient {public static void main(String[] args) {// create a calendarCalendar calendar = Calendar.getInstance();System.out.println(calendar.isLenient());}}
Output:
true
No comments:
Post a Comment