IDEA/Eclipse添加構造函數 Get/Set方法 toString方法快捷鍵

一、IntelliJ IDEA 首先你要創建私有屬性,比如private String name;然後使用快捷鍵「alt+insert」,就出來Generate菜單了,你可以選擇Constructor(構造函數),Getter and Setter方法,equals()方法,toString()方法等。     記住哦!快捷鍵爲:alt+insert 二、Eclipse     記住哦!快捷鍵爲:
相關文章
相關標籤/搜索