In the previous Java examples, we have discussed about date functions and how to get the current date and time. But in this example, we are going to show the current month of the existing year. This Java get month example is simply going to print the current month name like January, February etc..
For this purpose we have import the java.util.Calendar package in our program.
Syntax for Getting the current month in Java
Output will be displayed as:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: October 15, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles