For beginners Just display Java's Hello World in Eclipse.
Eclipse shouldn't make much difference in any version, This article is doing Photon in Eclipse 2018
Open "java Project" of "New" of "File"
Enter only the project name appropriately. It was set as Test1.
Open "New" "Package" in the src of the created project
Enter an appropriate name. It was set as Test1.
Open a new "class" in the created package
Enter an appropriate name. It was set as Test1. (In Java, class names should start with a capital letter) Since the syntax is automatically generated, check "public ~ args".
Put a description that outputs HelloWorld in the created class.
System.out.println("HelloWorld");
Add
Execute
OK when "Hello World" is displayed on the lower left console.
The image is Workspace> Project> Package> Class The workspace is the location of the folder where the whole exists, and can be changed from "File"-"Switch workspace". As you can see by trying it, the settings etc. of Eclipse are retained, so if you change it, the settings etc. will return to the initial state.
The project is a group of programs. A package is a collection of Java classes. Class is class .. Since java cannot be executed as it is, when it is executed in Eclipse, it is automatically built and executed.
Recommended Posts