How to make System.out.println() shorter

后端 未结 12 978
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 07:10

Please advice on where can I find the lib in order to use the shorter expression of System.out.println() and where should I place that lib.

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 07:50

    My solution for BlueJ is to edit the New Class template "stdclass.tmpl" in Program Files (x86)\BlueJ\lib\english\templates\newclass and add this method:

    public static  void p(T s)
    {
        System.out.println(s);
    }
    

    Or this other version:

    public static void p(Object s)
    {
        System.out.println(s);
    }
    

    As for Eclipse I'm using the suggested shortcut syso + + :)

提交回复
热议问题