Calendar isWeekDateSupported() in Java

isWeekDateSupported(): This method is available in java.util.Calendar class of Java.

Syntax:

boolean java.util.Calendar.isWeekDateSupported()

This method returns whether this Calendar supports week dates.

Parameters: NA

Returns: true if this Calendar supports week dates; false otherwise.

Exceptions: NA

Approach

Java

import java.util.Calendar;

public class CalendarisWeekDateSupported {
    public static void main(String[] args) {

        // create a calendar
        Calendar calendar = Calendar.getInstance();

        System.out.println(calendar.isWeekDateSupported());
    }
}

Output:

true


No comments:

Post a Comment