Java Basic Overview

Source: Internet
Author: User

features of the 1.java language


1. Object-oriented: Basic concepts (classes, objects )

Three major features: encapsulation, inheritance, polymorphism

2. Robustness

3. Cross-platform: Applications written in the Java language can be run on different system platforms.

2. What is a JDK, JRE?

JDK:JDK is available to Java developers, which includes Java development tools and JRE, so the JDK is installed without having to install the JRE separately (developer kit)

Jre:java Operating Environment

3. Configure environment variables?

Note: Every tool that executes Java has to go into the bin directory, which is very cumbersome.

Depending on how the Windows system looks for executable programs, you can define the path where the Java tools are located in the PATH environment variable, and let the system help us find the program that runs the execution.

Configuration method:

-My Computer-Properties-Advanced system settings-environment variables

-Edit the PATH environment variable, starting with the value of the variable and adding the directory where the Java tool resides

(1, Set java_home variable name fill in: Java_home

2. After the setup classpath is complete, click OK. Then continue to create a new system variable name fill in: CLASSPATH variable value fill in:.; %java_home%\jre7\lib (Note the previous.)

3. Set path to add the value of the variable at the front of the variable value:%java_home%\jre7\bin; Click OK to save after you finish. )

-Open DOS command line, enter Javac in any directory, if javac parameter information appears, the configuration is successful.

4. Simple program Attention points

1. A Java source file can only have one public class

2. Strictly case-sensitive

3. Each statement ends with a semicolon

5. Notes

1. Single-line Comment

Format://xxxxx

2. Multi-line annotations

Format:/*xxxxxx*/

For single-line and multiline comments, the annotated text is not interpreted by the JVM (Java Virtual machine).

Note: Multiline comments do not allow multiple lines of comment nesting.

Java Basic Overview

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.