Java notes (i) Basic concepts

Source: Internet
Author: User

One.

1. Download the toolkit that installs JDK,JDK as Java.

2. How to configure Classpath,path.

After installing the JDK, add C:\Program Files (x86) \java\jdk1.8.0_05\bin in path.

Add '. ' To the Classpath

3.Hello World Example.

public class hello{
public static void Main (String args[]) {
System.out.println ("Hello world!");
}
}

Save this file as Hello.java, noting that the naming is consistent with the class name.

4. Go to cmd, go all the way to the Hello source file directory.

5. Enter Javac Hello.java, compile the Java source file, generate Hello.class

6. Enter Java Hello to run successfully.

Two.

The JRE (Java Runtime Environment) is the operating environment of the Java program. The Java program that you write will form the word lines file after Javac compilation, this middle file of Java, the computer is not understood, and this file is for the JVM (Java Virtual Machine), by the JVM to explain the formation of machine language to the computer. The JVM is in the JRE, which means that the Java program runs with the JRE.

Three. Variable naming

1. Hump naming method. A word is named, then all lowercase, and multiple words consist of the first word lowercase, and the first letter of the other word capitalized.

2. The variable must begin with a letter, underscore, or $.


This article is from the "All for the law, such as Fleeting Dream" blog, please be sure to keep this source http://kaixinbuliao.blog.51cto.com/2567365/1543644

Java notes (i) Basic concepts

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.