"Java4android", Hello World

Source: Internet
Author: User

    • History of Java
    • JDK Installation for Java
    • Java's first program Hello World

1 History of Java slightly.

2 JDK Installation for Java

To develop Android apps, learn Java first.

The JDK version I downloaded is 1.6, 32 bit, and the system is Win7.

A default installation, all the way next is OK.

B Environment Configuration

Configure two environment variables: Path,classpath.

Path is the directory where the JDK is installed.

Classpath here for the time being.; (a point is just fine) as to why I studied it again.

If the installation is successful, open cmd, input java-version should be the relevant version of the information such as the occurrence.

3 First program of Java Hello World

 Public class hello{    publicstaticvoid  main (String args[]) {        System.out.println ( "Hello World");}    }

Save the file as Hello.java and put it in E:\gmzJava.

Open cmd, and then click

E: Enter

Gmzjava Javac Hello.java Enter (this step will produce Hello.class, here is the Hello.java source file compiled into Hello.class, similar to the language of human understanding to translate into a machine can read the language)

Java Hello return (performing this step will show Hello world)

Note: The names of the files here are case-sensitive. Java is case-sensitive.

OK next time to study.


D

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.