In Android Application, I am trying to retrieve the current month and year, by using the following code.
setMonth(Calendar.getInstance().getTime().getMonth());
setYear(Calendar.getInstance().getTime().getYear());
System.out.println("MONTH sssssssssss:" + Month);
System.out.println("YEAR ssssssssssss:" + Year);
output is
04-20 16:36:43.723: I/System.out(4718): MONTH sssssssssss:3
04-20 16:36:43.723: I/System.out(4718): YEAR ssssssssssss:114
Could someone please help me to correct year value?