MonthDay equals() method in Java with Examples
The equals() method of MonthDay class in Java checks if this month-day is equal to another month-day.
public boolean equals(Object obj)
Parameter: This method accepts a parameter obj which specifies if this month-day is equal to another month-day.
Returns: The function returns true if this is equal to the other time.
Below programs illustrate the MonthDay.equals() method:
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. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.