Java注释共有三种:
一、单行注释
//.....
public class HelloWorld{
public static void main(String [] args){
System.out.println("HelloWorld");//This is what I want to say.
}
}
二、多行注释,但不能在javadoc生成的文档中显示
/*
*...
*/
/*
*This is what I want to say.
*/
public class HelloWorld{
public static void main(String [] args){
System.out.println("HelloWorld");
}
}
三、多行注释,可以在javadoc生成的文档中显示
/**
*...
*/
/**
*This is what I want to say.
*/
public class HelloWorld{
public static void main(String [] args){
System.out.println("HelloWorld");
}
}