Because you need to create an instance first.
try this
Calendar.getInstance().get(Calendar.YEAR);
and you are good to go.
Because you need to create an instance first.
try this
Calendar.getInstance().get(Calendar.YEAR);
and you are good to go.