MessageFormat equals() method in Java with Example
The equals() method of java.text.MessageFormat class is used to check if both the MessageFormat objects are same or not.
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.
public boolean equals(Object obj)
Parameter: This method takes MessageFormat objects which will be compared with the current MessageFormat object.
Return Value: if both the MessageFormat objects are equal to each other than it will return true otherwise false.
Below are the examples to illustrate the equals() method:
mf1 is equals to mf2
mf1 is not equal to mf2