English 中文(简体)
与JavaDoc有关的问题[闭门]
原标题:Issues with JavaDoc [closed]
  • 时间:2011-10-04 18:03:36
  •  标签:
  • java
  • javadoc

因此,我正试图正确而充分地 j笑这个法典的主体,但我很想知道,什么是做的,什么是做的。 感谢!

public double largerRoot (double a, double b, double c) throws Exception
{
    double discriminant;
    double root1;
    double root2;

    discriminant = Math.sqrt ( b * b - 4 * a * c );

    if ((discriminant < 0) || (a == 0))
    {
        throw (new Exception("Math Error"));
    }

    root1 = (-b + discriminant) / (2 * a);
    root2 = (-b - discriminant) / (2 * a);

    return Math.max(root1, root2);
    }
最佳回答

页: 1 Alt + Shift + J

其他:gogle (

问题回答

第一:我改称名词的b和c参数。

第二:方法/分类说明:总是在铭记“Why”的情况下撰写javadoc。 我指的是,大多数发展中国家撰写了“javadoc”,解释《守则》做了什么......这是无助的,因为大多数方案者知道如何读《守则》。 我总是试图描述这种分类或方法的原因,以及它应当达到什么目的(合同)。

Third: details about parameters is a must (null accepted or not, is there any range..etc)

Fourth: details about the return value.

第五:参考:......对于希望了解你在方法中使用某类避孕器的javadoc用户来说,可以有用。

希望会提供帮助。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签