gpt4 book ai didi

java - sun.misc.FloatingDecimal 在哪里?

转载 作者:行者123 更新时间:2023-12-02 12:02:50 26 4
gpt4 key购买 nike

jdk1.8.0_144中的src.zip包含Float.java

这又指的是 sun.misc.FloatingDecimal。我在 src.zip 中找不到它?谁能告诉我它在哪里?我可以找到 grepcode 中列出的源:http://grepcode.com/file_/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/misc/FloatingDecimal.java/?v=source

但显然,代码必须存在,我的库才能调用它。

更奇怪的是,在 Float 类中:

public static float parseFloat(String s) throws NumberFormatException {
return FloatingDecimal.parseFloat(s);
}

但是,搜了一下我能看到的代码(诚然,只有jdk1.6)连FloatingDecimal.parseFloat这个方法都没有。

最佳答案

他们没有将其包含在 src.zip 中。

根据 JDK 8 README :

Java programming language source files for all classes that make up the Java core API (that is, sources files for the java., javax. and some org.* packages, but not for com.sun.* packages). This source code is provided for informational purposes only, to help developers learn and use the Java programming language. These files do not include platform-specific implementation code and cannot be used to rebuild the class libraries.

正如您所发现的,您可以从 Grepcode 等第三方来源获取源代码。

关于java - sun.misc.FloatingDecimal 在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47124355/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com