Java Short equals() MethodThe equals() method of Short class is used to compare two objects for checking equality. SyntaxParametersObj: the object to compare with Return valueTrue: If both object are same. False: If both object are different. Example1: (Both object same)Test it NowOutput: short Obj1 55 and short Obj2 55 are same : true Example 2: (Both object different)Test it NowOutput: short Obj1 65 and short Obj2 85 are same : false
Next TopicJava Short
|