Calendar.isLenient() has the following syntax.
public boolean isLenient()
In the following code shows how to use Calendar.isLenient() method.
/*from w w w .ja v a 2s .com*/ import java.util.Calendar; public class Main { public static void main(String[] args) { Calendar cal = Calendar.getInstance(); // tells whether date/time interpretation is lenient. boolean b = cal.isLenient(); System.out.println(b); } }
The code above generates the following result.