In File> New> Project, select Gradle / Java and press Next.
Enter any name in Name. (ef.SpringBootSample) Set the GroupId and ArtifactId. (This time is the default) Finally, press Finish to create the Project.
Right-click on the root project in the Project pane on the left From New> Directory, select src> main> java and press Enter to create the folder.
Right-click the created java folder and select New> Package. Type org.example and press Enter.
Furthermore, right-click the example folder and select New> Class. With Class selected, type Main and press Enter.
Describe the following in the created class.
Main.java
package org.example;
public class Main {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Execute Main.main ().
4:33:31: Executing task 'Main.main()'...
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :Main.main()
Hello World
You can now write Java code in IntelliJ.
Recommended Posts