The reverseByte() method of Java Integer class returns the value obtained by reversing the order of the bytes in the 2’s complement binary representation.

Syntax

public static int reverseByte (int i)

Parameters

The parameter ‘i’ represents the bytes whose value is to be reversed.

Return Value

This method returns the value obtained by reversing order of the bytes in the specified int value.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This