GregorianCalendar is the class which provides you all the attributes of date and time, if you want to show the current time in your program or application you can perform many calculations on date and time.
Check the following link to get examples, methods of GregorianCalender. https://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html
Vote up, if you find it helpful.