We can use Date class to use current date. In this program we are creating a Date object and by using it we are going to display the current date and time. It implements Serializable, Cloneable, Comparable interfaces. Its known subclasses are Date, Time, Timestamp.
Code of a program is given below:
Output of this program is given below:
Today date is Tue Dec 19 22:14:46 GMT+05:30 2006
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: June 7, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles