原創(chuàng)|使用教程|編輯:我只采一朵|2016-07-26 14:03:07.000|閱讀 1912 次
概述:IntelliJ IDEA使用教程之Java SE開發(fā)進(jìn)入正式編碼階段,從HelloWorld class開始,運(yùn)用Live模板幫助你更輕松的完成任務(wù)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
聲明package和HelloWorld class:
package com.example.helloworld; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } }
快捷鍵Shift+Enter開始新的一行:
本來這樣也是可行的:
public static void main(String[] args) {}
但是建議你換一種方式,輸入p然后Ctrl+J:
選擇psvm - main() method declaration,使用上下鍵可以上下移動選擇,回車選中。
結(jié)果如下:
IntelliJ IDEA提供了一些代碼片段,統(tǒng)稱為live templates。在Code | Insert Live Template或者Ctrl+J找到live模板。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@ke049m.cn