eclipse write the first java

Write the first java with eclipse



1. How to use it?

With the free and open source Eclipse, writing java is much easier. We choose for Java Developers is enough.
1. Select file–new–java project, enter the project name, and then finish
2. Right-click the project –new–package, enter the name, and then complete
3. Right-click the package –new–class, enter the name, and complete
the project as shown in the figure For helloworld, the package is org.zhengqian and the class is zhengqian. The results are as follows.
Insert picture description here
Note that the class name must be the same as the .java file name
Each compilation unit can only have one public class, or there can be none
and only one main() method.
Public means access rights, static indicates that the method is a class method, which can be called directly by the class name; void means that no value is returned

Second, use steps

1. Debug program

Double-click the left mouse button on the left side of the source code, you can set the breakpoint of the current line, and then select debug as java Application to run the java program, switch, you can view the variables and track the variables through the debug transmission interface. Terminate ends the debugging.

2. Read in the data

Export/import project

Right-click and select export, general file System, next. to directory can be exported.

Importing projects is similar, click file, import, general, existing projects into workspace, next.


to sum up

eclipse is powerful, and for me novices, it is conducive to writing debugging code.

Guess you like

Origin blog.csdn.net/qq_44682019/article/details/108770304
Recommended