Java Byte compareUnsigned() methodThe compareUnsigned() method of Java Byte class compares two byte objects numerically by treating the values as unsigned. Syntax:Parameters:The parameters 'x' and 'y' represent the first and second byte value to compare. Return ValueThis method returns an integer value.
Example 1Test it NowOutput: compareUnsigned method will return 1 Example 2Test it NowOutput: -9 is greater than -10
Next TopicJava Byte
|