Is there a way to run short bits of Java code without compiling?

后端 未结 9 1371
無奈伤痛
無奈伤痛 2020-12-25 15:33

Is there a way to run or simulate running Java statements (kind of like IDLE - the Python GUI) without compiling and running the executable? I want to quickly test statement

9条回答
  •  情话喂你
    2020-12-25 15:54

    Use JShell, which is included by default starting from JDK 9. It is command-line based Read Eval Print Loop (REPL), where you can enter Java code, and get the results immediately.

提交回复
热议问题