JAVA编程规范V1.1(7)

时间:2025-07-13

JAVA编程规范V1.1

1.1.3 注释

注释方法

Try to use the // commenting style for a majority of your comments the /** */ commenting style is for all of your javadoc comments

the /* */ commenting style only for temporarily commenting out blocks of code

JAVA DOC

明显的方法可以不加注释,如: public static void main( String[] args ) public int getX()

public void setX( int newX )

超过一行的Doc注释

/** Set how much to grow when growth is needed. <p>

Smaller values will usually save memory, but frequent reallocation may take a lot of time. <p>

@param howMuch The number of extra ints to allocate when memory reallocation is required. Values must be greater than zero. <p> */

public void setExtra( int howMuch )

{

JAVA CLASS注释

Class摘要描述 详细描述

使用Class的示例代码 作者,使用 @author 标签 如:

/** A vector class optimized for working with ints. <p>

Like the Vector object, except rather than tracking a dynamic array of pointers to different objects, this is simply a dynamic array of ints. The advantage is speed and memory savings.<p>

JAVA编程规范V1.1(7).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219