Scala Int Compare Method With Examples
compare is an int class method in Scala which is used to compare this with that operand.
Returns: return -1 when Given_Value1 is less than Given_Value2. return 0 when both values are equal. return 1 when Given_Value1 is greater than Given_Value2.