English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
This method returns the value obtained by reversing the byte order of the binary complement representation of the specified integer value. Now let's look at the syntax.
int reverseBytes(int i)
The following are the parameters.
i-This is an integer value
public class Demo { public static void main(String[] args) { System.out.println(Integer.reverseBytes(0)); System.out.println(Integer.reverseBytes(-87)); System.out.println(Integer.reverseBytes(98)); } }
Output Result
0 -1442840577 1644167168