面临 BlueJ Java 个问题

Faced BlueJ Java questions

"What is the format of the first line of a method?" 这取决于开发人员的设计吧?但是不知何故,除了我的以外,我该如何写出正确的答案。

"How can you view javadoc for a class?" 这是我找不到解决方案的最困难的问题。请指导。

方法第一行的格式是什么: 完成一些 java 教程 -> The Java™ Tutorials

如何查看 javadoc 的 class: 如果您没有使用任何 ide 那么您有 2 个选项

  1. 在线打开Java Doc
  2. 打开源代码并查看文档。

如果您正在使用 IDE 类似 eclipse,请参阅以下内容

  1. How to add javadocs to eclipse

What is the format of the first line of a method?

方法的第一行由修饰符组成,例如publicprivate,然后是return类型、方法名称、参数列表和可选的throws 带有方法可能抛出的异常类型的子句。

有关详细说明,请参阅 Oracle Java 教程中的 Defining Methods

How can you view javadoc for a class?

您可以找到 Javadoc online. Most IDEs have a built-in capability to view the Javadoc. Check the BlueJ documentation.