Java Calendar.getWeeksInWeekYear()
Syntax
Calendar.getWeeksInWeekYear() has the following syntax.
public int getWeeksInWeekYear()
Example
In the following code shows how to use Calendar.getWeeksInWeekYear() method.
/* w w w . j a v a 2 s .co m*/
import java.util.Calendar;
public class Main {
public static void main(String[] args) {
Calendar now = Calendar.getInstance();
System.out.print(now.getWeeksInWeekYear());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »