Check out example codes for "java Calender examokes". It will help you in understanding the concepts better.

Code Example 1

// Get curremt time and date.
Calendar calendar = Calendar.getInstance();  
System.out.println("The current date is : " + calendar.getTime());

Learn ReactJs, React Native from akashmittal.com