123
Java Short equals() Method
The equals() method of Short class is used to compare two objects for checking equality.
Syntax
Parameters
Obj: the object to compare with
Return value
True: If both object are same.
False: If both object are different.
Example1: (Both object same)
Output:
short Obj1 55 and short Obj2 55 are same : true
Example 2: (Both object different)
Output:
short Obj1 65 and short Obj2 85 are same : false
Next TopicJava Short