IDEA使用之HelloWorld

  1. 创建一个空项目(JavaSE_Code)
  2. 创建一个新模块(idea_test)
  3. 在idea_test模块下的src下创建一个包(com.itheima)
  4. 在com.itheima包下新建一个类(HelloWorld)
  5. 在HelloWorld类中编写代码
  6. 在idea中执行程序

IDEA中项目结构

53/54/55/56/57.JAVA入门__IDEA使用

IDEA中内容辅助键和快捷键

  1. 内容辅助键
    a.快速生成语句
    快速生成main()方法: psvm,回车
    快速生成输出语句:sout,回车
    b.内容辅助键
    ctrl+alt+space(内容提示,代码补全等)
  2. 快捷键
    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

相关文章:

  • 2021-11-30
  • 2022-12-23
  • 2021-08-17
  • 2021-10-01
  • 2021-08-08
  • 2022-01-12
猜你喜欢
  • 2021-11-22
  • 2021-12-20
  • 2022-12-23
  • 2021-07-04
  • 2021-11-28
相关资源
相似解决方案