Java で Math.reverseBytes を使用しようとしましたが、エラーが発生しました: The method reverseBytes() is undefined for the type Math
ご存じのとおり static 型です。なんで使えないの?
import java.lang.Integer;
public class Test {
public static void main(String[] args) {
int x = Math.reverseBytes();//Eclipse cannot reach this function
}
}
Java Doc から - いくつかの情報
逆バイト数
public static int reverseBytes(int i);
指定された int 値の 2 の補数表現のバイトの順序を逆にした値を返します。
戻り値: 指定された int 値のバイトを反転して得られた値。
以降: 1.5