Web-android Engineer-1-5 using eclipse to develop Java programs

Source: Internet
Author: User

Eclipse---IDE

The integrated development Environment (IDE) is a type of software

Improve development efficiency by assembling program development environment and program debugging environment

Other Ides, such as: MyEclipse, NetBeans

Download: http://www.eclipse.org/downloads/

Windows,linux, and a 32bit,64bit version.

After the download is complete, unzip to use, run the direct click Eclipse.exe, set the default project path after startup

Eclipse Java Development Steps

1. Create a Java project

2. Create a Package

3. Writing Java source programs

4. Running Java programs

Detail

After you open eclipse,

1. Create a Java project

Click menu File-> New Java Project

Or

Right-click New->java Project in the package Explorer blank

Then in the pop-up window of "New Java Project", project name to the right to enter project names, such as Immoc, other things to choose Default, and then click Finish

When the above steps are complete, the SRC and JRE System libraries appear in the package explorer

SRC directory for storing source files

2. Create a Package

In the Package Explorer window, right-click SRC, select New->package, pop-up Windows New Java Package window

Then enter the package name, for example COM.IMOOC, then click Finish and a new package file will appear in the SRC directory

3. Writing Java source programs

You need to create a new source file under the package you just created

In just the package, for example COM.IMOOC, right-click, select New--Class, pop-up Windows new Java class window

Type a name at name, such as HelloWorld, and click Finish directly

Source code files can be seen in the package Explorer: Helloworld.java

And some code is generated by default:

 Package Com.imooc;  Public class HelloWorld {}


Then enter the following red font contents in curly braces:

 Package Com.imooc;  Public class HelloWorld {    publicstatic void Main (string[] args) {        System.out.println ("I Love imooc!" );    }}


4. Running Java programs

In the code blank, right-click, select Run as--Java application

And then print it in the console.

I Love imooc!

Code Description:

Package Com.imooc;public class HelloWorld {---> public is the modifier for the class, class is the keyword for the classes,  HelloWorld is the name of the class, Note: The name of the class to be consistent with the source code file name public    static void Main (string[] args) {  ---->main for the entire program entry        System.out.println ("I love imooc!");  ----> Implement Output    }}

Web-android Engineer-1-5 using eclipse to develop Java programs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.