Java Date getMonth() MethodThe getMonth() method of Java Date class returns the value between 0 to 11 which represents the month of the year. This method is deprecated as of JDK version 1.1 and replaced by Calender.get(Calender.MONTH)
Syntax:ParametersNA ReturnIt returns the month of the year represented by this date object. ExampleTest it NowOutput: Month of the year is : 8 Next TopicJava Util Date |
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