Home>Article>Java> How to write java program using eclipse

How to write java program using eclipse

王林
王林 Original
2019-11-12 09:29:47 6668browse

How to write java program using eclipse

1. First open eclipse, right-click on the blank space on the Package Explorer bar, and select New--->Java Project

## in the menu that appears.How to write java program using eclipse

#2. On the interface as shown in the figure, name the project name. You can select Working set or not select it. Click Finish. At this time, the demo project is built

How to write java program using eclipse

3. Click on the demo project, right-click on src, and select the following package option

How to write java program using eclipse

4. Name the package name in the interface as shown, such as : com.it.test, click finish

How to write java program using eclipse##5. Right-click on the registration and select the following options

How to write java program using eclipse6. After confirmation, the following interface will appear. Name the name as the name of the program, check the main method, as shown in the figure, and click finish

How to write java program using eclipse7. As shown in the figure, a program named test The java file is written. You can write your own program in the main method. After writing, right-click and select the following options. After confirmation, the program will compile and run. If there are no errors in the program, the running results will appear on the console. Otherwise, control The error message

How to write java program using eclipse#8 will appear on the station. As shown in the figure, the running result of the above simple program is 30

How to write java program using eclipseRecommended tutorial :

java tutorial

The above is the detailed content of How to write java program using eclipse. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is java constructor Next article:what is java constructor