The getValue() method of Year class in Java is used to get the integral value of the current Year object.
public int getValue()
Parameter: This method does not accepts any parameter.
Return Value: It returns an integer denoting the value of the current year object.
Below programs illustrate the getValue() method of Year in Java:
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.