Overview of Java language Features

Source: Internet
Author: User

I. Preface

We all know that Java is Object-oriented programming, with four basic features: abstraction, encapsulation, inheritance, polymorphism. These four characteristics, summed up can be understood, abstract, encapsulation, inheritance is the basis of polymorphism, polymorphism is the expression of abstraction, encapsulation, inheritance.

two. JAVA language features
A) cross-platform, compile once, run everywhere.
b) slow, but stable, no memory leaks (leakage), not prone to errors.
c) is not suitable for high speed requirements of the graphical interface operation, suitable for service-side applications.
c/S (client/server)/b (Browser/server)
three. JAVA Programming general Execution Process
A) compiling JAVA source code files (*.java)
The file is a text file.
b) Compile
*.java-*.class (bytecode, bytecode, which is not a true X86 machine language. )
The JAVA compiler (compiler) under the window platform is Javac.exe.
c) Executing in the JAVA virtual machine (JVM)
(The JAVA virtual machine under the window platform is Java.exe)
Byte codes are not machine language for specific hardware CPUs.
For the JVM, bytecode is the machine language.
Four. Understand the JVM and understand the cross-platform
Jvm:java Virtual Machine
1) The JVM, like a translator, translates Java bytecode in real time into the machine language of the corresponding hardware CPU, because there is a cost of translating so that Java runs slower.
2) A JVM knows only one hardware language, so different platforms (different CPUs) will need to have different JVMs installed.
3) Because of the existence of JVM mechanisms, Java can cross-platform, Java cross-platform is based on the JVM is not cross-platform.
4) JAVA runs slowly, but is stable and secure because it relies on the JVM mechanism.
Five. Understanding the JRE and JDK
Jre:java Runtime Environment (JAVA Runtime Environment)
Consists of the JVM plus some running class libraries (jar packages).
Jar:java Archive (Java class compression package, a lot of Java classes are compressed together to get.)
The Jdk:java Developer Kit (JAVA Development Kit) is comprised of Jre,java compilers, sample code, and so on.
If you just need to run a Java bytecode file, you only need the JRE, but if you're a Java programmer, you'll need to install the JDK
Six. Basic JAVA program Structure

A) JAVA is a purely object-oriented programming language, with class everywhere.

b) JAVA class name must be uppercase, in line with the hump naming law; register all lowercase, flip by domain name

c) Java class name is the same as its name, preferably a Java file a class

d) The executable JAVA class has a main () method as the entry point.

e) The JAVA variable name and method name are lowercase, and other parts continue to be processed by the hump naming method.

Overview of Java language Features

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.