How to change auto-generated code when creating new class in Eclipse

后端 未结 5 1846
渐次进展
渐次进展 2020-12-04 22:03

Whenever I create a new Java file in Eclipse and check off the option to add public static void main(String args[]), this code is generated:

pub         


        
5条回答
  •  死守一世寂寞
    2020-12-04 22:51

    1. In Eclipse Go to Window->Preferences
    2. In Left Panel, Select Java->Code Style->Code Template
    3. Under "Configure generated code and comments", Expand Comments-> select Methods,Click Edit Remove or replace the pattern ( * @param args),Click OK
    4. Under "Configure generated code and comments", Expand Code-> select Method Body,Click Edit Remove or replace the pattern ( // TODO Auto-generated...),Click OK
    5. Click OK !

提交回复
热议问题