zoukankan      html  css  js  c++  java
  • eclipse注释快捷键(含方法注释)

    整段注释:

    /*public boolean executeUpdate(String sql) {
            System.out.println(sql);
            boolean mark=false;
            try {
                getStm();
                int iCount = stm.executeUpdate(sql);
                if(iCount>0)                
                    mark=true;            
                else
                    mark=false;
            } catch (Exception e) {
                e.printStackTrace();
                mark=false;
            }
            return mark;
        }*/

    注释:【Ctrl】+【Shift】+【/】

    反注释:【Ctrl】+【Shift】+【】

    单行注释:

    //    public boolean executeUpdate(String sql) {
    //        System.out.println(sql);
    //        boolean mark=false;
    //        try {
    //            getStm();
    //            int iCount = stm.executeUpdate(sql);
    //            if(iCount>0)                
    //                mark=true;            
    //            else
    //                mark=false;
    //        } catch (Exception e) {
    //            e.printStackTrace();
    //            mark=false;
    //        }
    //        return mark;
    //    }

    注释:【Ctrl】+【/】

    反注释:【Ctrl】+【/】

    方法注释:

      /** 
         * @功能 对数据库的增加、修改和删除的操作
         * @参数 sql为要执行的SQL语句
         * @返回值 boolean型值 
         */
        public boolean executeUpdate(String sql) {
            System.out.println(sql);
            boolean mark=false;
            try {
                getStm();
                int iCount = stm.executeUpdate(sql);
                if(iCount>0)                
                    mark=true;            
                else
                    mark=false;
            } catch (Exception e) {
                e.printStackTrace();
                mark=false;
            }
            return mark;
        }

    生成方法注释:【Alt】+【Shift】+【j】

    说明:eclipse对于方法的注释非常松,自定义说明@之后的文字,在任何一个地方调用都能完成显示出来,这一点与VS对比,VS比较死板。

    格式化代码:

    【Ctrl】+【Shitf】+【F】

    说明:如果失效,那就是输入法或者其它软件的快捷键冲突导致的,修改其中一个即可。

  • 相关阅读:
    整理—类型转换
    HTML简历
    数组
    选择语句2
    类型转换、运算符'
    C#(VS)基础
    hdu_1037(水题水疯了。。。史上最水)
    hdu_1033(我怎么找到的这么水的题,只为保存代码。。。)
    hdu_1030(数学题+找规律)
    hdu_1029_hash/map
  • 原文地址:https://www.cnblogs.com/EasonJim/p/6219171.html
Copyright © 2011-2022 走看看