I am having the following problem in Java (I see some people are having a similar problem in JavaScript but I\'m using Java)
System.out.println(new Date().ge
According to javadocs:
@Deprecated
public int getYear()
Deprecated. As of JDK version 1.1, replaced by Calendar.get(Calendar.YEAR) - 1900
.
Returns a value that is the result of subtracting 1900 from the year that contains or begins with the instant in time represented by this Date object, as interpreted in the local time zone.
Returns: the year represented by this date, minus 1900.
See Also: Calendar
So 112 is the correct output. I would follow the advice in the Javadoc or use JodaTime instead.