
This Java programming workflow does not create a separate project unless I need one.1 VS Code: You don't need that extension 2 The easy way to find the perfect font and theme combination. Instead I want to save that code in a text file. I don't even want to create a project for the best code block. For example when I'm trying a code block from Stack Overflow I usually don't want to create a whole project for it, because I want to try multiple code blocks and throw most of them away after trying them once.

I can also run the Java code by itself by clicking the ▶ icon without having to create a project for it first. Running Java code with Code Runner in Visual Studio Code is more convenient than running the same code in the terminal because I can debug the Java code from Visual Studio code using the Debugger for Java extension which I also have installed. The output will be shown in the console pane which is located immediately below the code pane.Ĭode pane and console in Visual Studio Code When you hover the mouse over the ▶ icon a tooltip pops up which says Run Code (Ctrl+Alt+N).


To run Java code with Code Runner, save Shuffle1.java by selecting File -> Save, and click the ▶ icon in the upper right corner of the code pane. Running the code in the question in Visual Studio Code with the Code Runner extension gives the correct console output: a-b c-d
