Java Short reverseBytes() methodThe reverseBytes() method of Java Short class is used to obtain a primitive short value reversing the order of bits in two?s complement form of the given short value. SyntaxParametersS: The value whose bytes will be reversed. Return valueIt returns the value obtained by reversing the bytes in the specified short value. ExceptionN/A Example 1Test it NowOutput: Reversed short value is = 7680 Example 2Test it NowOutput: Reversed short value is = 23040 Example 3Test it NowOutput: Reversed short value is = -3071
Next TopicJava Short
|