Dark Horse Programmer Java Basics

Source: Internet
Author: User

The history of 1.java

2. Environment variables

3. Keywords

4. Identifiers

5. Notes

1.java history

1994 formally named Java (with coffee meaning);

< Span style= "font-family: Microsoft Jacob Black; Font-size:large; " > development: 1995 release of Java and release jdk1.0;1998 Sun has renamed Java to Java2. The development of Java mainly stems from the rise of the Internet tide; in June 1999, Sun released three versions of Java: Standard, Enterprise, and Mini (J2SE, Java, J2ME); September 30, 2004 j2se1.5 release is another milestone in the history of the Java language. To indicate the importance of this version, j2se1.5 renamed to j2se5.0. In June 2005, Sun disclosed Java SE 6 and renamed the Java EE, j2se renamed Java Se,j2me to Java ME.

future: Java After nearly 20 years of Frost baptism, is still one of the mainstream programming languages of the moment, and it can be seen how excellent it is. In the future, with the rise of the mobile internet, I believe Java will be more powerful.

2. Environment Variables

path environment variable: it is the external command search path for the Windows operating system;

CLASSPATH environment variable: It is the search path to the Java class file;

How to set the Java PATH environment variable: My Computer Right-click on properties Advanced System Settings Advanced "environment variable" in the System variable column find the PATH variable "click Edit" at the end of the variable value added ";" number, and then add their own Java installation path "Example: Custom installation path \java\jdk1.7.0_45\bin\"; CLASSPATH the environment variable in the same way, just add the classpath variable yourself, and then edit the value;

3. Keywords

keywords : Is the Java language is given a special meaning of the identifier, we name our own variables or functions, not the same name as the keyword; there are about 50 or so keywords in the Java language:

Abstract Assert Boolean Break Byte
Case Catch Char Class Const
Continue Default Do Double Else
Enum Extends Final Finally Float
For Goto If Implements Import
instanceof Int Interface Long Native
New Package Private Protected Public
Return Strictfp Short Static Super
Switch Synchronized This Throw Throws
Thansient Try void Volatile While

4. Identifiers

identifier: It is in our Java program that we have customized some of the program-related meaningful names, it is defined by 26 uppercase and lowercase letters, numbers 0-9 and "$" and "_" composition;

definition rule: 1, number can not start

2, no keywords can be used

name Definition specification : 1, Package Name: All letters are lowercase when multiple words are composed, with "." In the middle. Separated. such as xxx.yyy.zzz;

 

5. Notes

Note: Comments play a role in the Java program, which can help us to quickly understand a piece of code, or the function of the entire program, in the later code maintenance has an indispensable role;

There are three types of annotation methods in Java, namely: 1, single-line comment

2, multi-line Comment

3. Documentation Comments

eg

Class demo{

/**

* Document Comment: This note can be completed by the program, exported with the tool, for the program to say

* Ming, usually placed directly above the class or function;

*/

public static void Main (string[] args) {

Single-line Comment: So the name Incredibles only one line at a time, more than the statement

/*

Multiline Comment: Comment Multiple lines at a time

*/

}

}

Annotations are for programmers, and the compiler ignores them when the program is compiled, so the annotations do not increase the volume of the compiled program;

Dark Horse Programmer Java Basics

Related Article

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.