Java Short compare() MethodThe compare() method of Java Short class compares two Short object numerically. Short is wrapper class. SyntaxParametersX: first short value Y: second short value Return value
Example 1when "short x = short y" Test it NowOutput: Two short values compared result: 0 Example 2Test it NowOutput: Two short values compared result: -10 Example 3Test it NowOutput: Two short values compared result: 10
Next TopicJava Short
|