我尝试在Java中使用Math.reverseBytes但是给出错误:方法reverseBytes()未定义为Math类型
如你所知它是静态类型.为什么我不能使用它?
import java.lang.Integer;
public class Test {
public static void main(String[] args) {
int x = Math.reverseBytes();//Eclipse cannot reach this function
}
}
Run Code Online (Sandbox Code Playgroud)
来自Java Doc - 一些信息
reverseBytes
public static int reverseBytes(int i);
Run Code Online (Sandbox Code Playgroud)
返回通过反转指定int值的二进制补码表示中的字节顺序获得的值.
返回:通过反转指定int值中的字节获得的值.
自:1.5
有IS没有"Math.reverseBytes()".
Integer.reverseBytes()或Short.reverseBytes(),是的.数学 - 没有.
PS:
你绝对应该在Eclipse中安装JavaDoc.这是如何做: