IDEA使用之HelloWorld
- 创建一个空项目(JavaSE_Code)
- 创建一个新模块(idea_test)
- 在idea_test模块下的src下创建一个包(com.itheima)
- 在com.itheima包下新建一个类(HelloWorld)
- 在HelloWorld类中编写代码
- 在idea中执行程序
IDEA中项目结构
IDEA中内容辅助键和快捷键
- 内容辅助键
a.快速生成语句
快速生成main()方法: psvm,回车
快速生成输出语句:sout,回车
b.内容辅助键
ctrl+alt+space(内容提示,代码补全等) - 快捷键
a.注释
单行:选中代码,ctrl+/ ,再来一次就是取消
多行:选中代码,ctrl+shift+/,再来一次就是取消
b.格式化
Ctrl+alt+L
IDEA中模块操作
新建模块
file —>project structure ----->moduls --> “+”—>new module —>java—>JDK–>next–>改名—>finish—>OK
删除模块
右键----->remove module
导入模块
file —>project structure ----->moduls --> “+”—>import