Java Calendar getWeekYear() MethodThe getWeekYear() method of java.util.Calendar class is a public method. This method gets the week year of calendar object and returns in integer the week year of calendar. SyntaxParameterNo parameter is passed. ReturnsReturns in integer week year of current calendar object . ThrowsUnsupportedOperationException Example 1Output: Current Time:Fri Aug 10 10:52:54 PDT 2018 week year :2018 Changed Time:Fri Jun 07 10:52:54 PDT 1996 Weeks in week year :1996 Example 2Output: Week : 52 Weekayear : 1969 Year : 1969 Next TopicJava-calendar-internalget-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India