gpt4 book ai didi

java - java.lang 的正式规范在哪里?

转载 作者:行者123 更新时间:2023-12-01 10:34:00 25 4
gpt4 key购买 nike

有 JLS(和 JVMS)定义了“核心”java。还有很多 JSR 扩展了它的功能。但是是否有 Java 标准库的规范,例如 java.lang ?

我找到的最接近的是 Java™ Platform, Standard Edition 8 API Specification ,但感觉更像是文档而不是规范。这个文档是 Java 标准库 API 的官方规范吗? oracle 以外的供应商(如 AdoptOpenJdk 等)是否阅读了这个类似文档的规范并实现了他们的 JRE 版本?或者还有另一个更“正式/官方”的规范?

最佳答案

是的,Java Doc 注释定义了官方 API 规范,根据 their statement :

Our documentation comments define the official Java Platform API Specification



Java API 没有其他“更官方”的文档。他们在链接的文章中详细阐述了使用 Java Docs 作为规范:

There are commonly two different ways to write doc comments -- as API specifications, or as programming guide documentation. These two targets are described in the following sections. A staff with generous resources can afford to blend both into the same documentation (properly "chunked"); however, our priorities dictate that we give prime focus to writing API specifications in doc comments. This is why developers often need to turn to other documents, such as Java SE Technical Documentation and The Java Tutorials for programming guides

关于java - java.lang 的正式规范在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61849373/

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