单行注释,形式:"//"
多行注释,不允许嵌套,形式:"/*...*/"
文档注释,常用于类和方法的注释,形式:"/**...*/"
 

package constxiong.interview;

/**
 * 文档注释
 * @author ConstXiong
 * @date 2019-10-17 12:32:31
 */
public class TestComments {
    
    /**
     * 文档注释
     * @param args 参数
     */
    public static void main(String[] args) {
        //单行注释
        //System.out.print(1);
        
        /* 多行注释
        System.out.print(2);
        System.out.print(3);
        */
    }

}

 


  

来一道刷了进BAT的面试题?

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-01-28
  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2021-12-16
  • 2021-05-21
  • 1970-01-01
  • 2023-03-20
相关资源
相似解决方案