I am trying to get today\'s Year, Month and Date using following code;
Calendar calendar = Calendar.getInstance(); int thisYear = calendar.get(Calendar.YEAR); L
I tried your code and it is giving correct output. You should try checking time in your emulator/phone on which you are trying this code.
According to getInstance docs, it sets to current date and time by Default.