1.文档注释
用法:
先输入/**,然后按下回车,需要几行信息就写几行,最后写上*/.
/**
* @author 黄大侠
* @version 1.1
*/
完整代码示例:
/**
* @author 黄大侠
* @version 1.1
*/
public class JavaDoc{
public static void main(String[] args)
{
System.out.printf("666");
}
}
生成网页文件:
终端命令:
javadoc -d 文件夹名 -xx -yy Demo.java
其中,上述-xx -yy对应着author 和 version.
文件夹名是我要把生成的文档保存在哪个文件夹.
运行截图:
Doc下生成的网页:
JavaDoc常用标签:
td {white-space:nowrap;border:1px solid #dee0e3;font-size:10pt;font-style:normal;font-weight:normal;vertical-align:middle;word-break:normal;word-wrap:normal;}标签 | 描述 | 示例 |
@author | 标识一个类的作者 | @author description |
@deprecated | 指名一个过期的类或成员 | @deprecated description |
指明当前文档根目录的路径 | Directory Path | |
@exception | 标志一个类抛出的异常 | @exception exception-name explanation |
从直接父类继承的注释 | Inherits a comment from the immediate surperclass. | |
插入一个到另一个主题的链接 | ||
插入一个到另一个主题的链接,但是该链接显示纯文本字体 | Inserts an in-line link to another topic. | |
@param | 说明一个方法的参数 | @param parameter-name explanation |
@return | 说明返回值类型 | @return explanation |
@see | 指定一个到另一个主题的链接 | @see anchor |
@serial | 说明一个序列化属性 | @serial description |
@serialData | 说明通过writeObject( ) 和 writeExternal( )方法写的数据 | @serialData description |
@serialField | 说明一个ObjectStreamField组件 | @serialField name type description |
@since | 标记当引入一个特定的变化时 | @since release |
@throws | 和 @exception标签一样. | The @throws tag has the same meaning as the @exception tag. |
显示常量的值,该常量必须是static属性。 | Displays the value of a constant, which must be a static field. | |
@version | 指定类的版本 | @version info |
2.Java代码规范
https://blog.csdn.net/qq_34869143/article/details/94554253
3.Dos命令
https://www.cnblogs.com/mqxnongmin/p/10919305.html
4.Java数据类型
暂时无法在飞书文档外展示此内容
自动转换:
byte,short,****char 三者不能自动相互转换,但是可以一起运算,一起运算时会转化为int.
Boolean 不参与转换.
强制转换:
public class test{
public static void main(String[] args)
{
long a = 1L;
float b = 1.1F;
}
}
其他数据->String:
public class StringConvert{
public static void main(String[] args)
{
int s = 1;
boolean a = false;
String s1 = s + "";
String t = a + "";
System.out.printf(s1 + a);
}
}
String->其他数据:
XXXX a = XXXXY.parseXXX(String);
5.Java文档:
暂时无法在飞书文档外展示此内容
标签:总结,Java,String,Day,version,文档,static,public From: https://www.cnblogs.com/huangjinhui/p/18325494