Java Learning to organize notes (i) Java understanding

Source: Internet
Author: User
Tags character classes java se

First, Java Introduction:

Java technology is divided into three main parts: Java language, Java Runtime Environment and Java class Library. (in general, it does not distinguish which part is referred to)

That is, Java is not just a programming language, it is a complete platform, a huge development class library (with many reusable code) and an execution environment for services such as cross-platform portability, automatic garbage collection, and security.

1.Java language:

As with other programming languages, a defined set of syntax specifications for programming.

2.Java Operating Environment:

the Java Runtime Environment (JRE) must be installed in the Java application application, and there is a Java virtual machine inside the JRE (Java JVM) and some standard class libraries. Java applications can be executed on a computer system through a JVM virtual machine.

The core of the Java Runtime Environment is the Java Virtual machine.

Java Virtual machine is an imaginary computer platform, which is realized by software simulation on the actual computer platform. The Java Virtual machine has its own imaginary hardware, such as processor, stack, register, etc., and also has the corresponding instruction system.

A source program written in the Java language first generates a bytecode file (a file with a. class suffix) consisting of bytecode instructions by the compiler. (bytecode instruction is a sequence code that can be recognized by a Java Virtual machine.) The bytecode file is interpreted by the Java Virtual machine for execution.

Explanation execution means that the Java Virtual Machine is responsible for translating the bytecode file into the machine code of the computer platform on which the virtual machine resides, and running it by the corresponding computer platform.

As long as the program is translated into a bytecode file for the first time, you do not have to worry about heterogeneous computer platforms, you can run on any machine with Java running environment, this is "write once, run everywhere" idea.

3.Java Class Library:

Java contains thousands of class libraries, such as character classes, math classes, thread classes, input and output classes, database classes, and so on. That is, in writing code, you can use the classes that are already in Java to design your program.

Second, Java features:

1. Platform Independence:

Platform independence means that software programs written on a single computer do not need to be modified to run correctly on any computer platform (operating system (OS) + processor (CPU) = platform) with different operating systems and processors.

The idea of "write once, run everywhere".

2. Object-oriented:

Java is an object-oriented programming language.

Object-oriented language is actually the description of the objective world, all things are objects.

The core of object-oriented language is three words: encapsulation, inheritance, polymorphism.

3. Simplicity and Security:

In Java, the Java Virtual Machine manages memory and garbage collection, avoids errors, eliminates the responsibility of the programmer to reclaim useless memory space, and improves development efficiency.

Java security is also reflected in the ability to build anti-virus, tamper-proof network application system. Java can guard against various attacks, such as "worms" and other viruses to overflow the runtime stack, "Trojan" Trojan with deception to access the object's private members, in the processing space of their own programs to destroy memory, unauthorized access to other parts of the computer and so on.

4. Multithreading:

The Java language itself supports multi-tasking implementations, each of which is a thread (a dynamically executing code). Multiple threads take turns using a resource-constrained processor (single-core or multicore), and the processor assigns a short execution time slice (in milliseconds) to each thread, feeling as if multiple tasks are executing simultaneously.

5. Dynamic Nature:

New methods and instance variables can be freely added to the class library without affecting the execution of the user program. Java programs can dynamically load classes while running, allowing Java to dynamically update programs and libraries in a distributed network environment to maintain programs more efficiently. and Java uses interfaces to support multiple inheritance, making it more flexible and extensible than strict class inheritance.

Third, the Java operating platform:

Java's operating platform is mainly divided into three versions.

1.Java SE (formerly known as J2SE)--java Platform Standard Edition. Used to develop and deploy Java applications in desktops, servers, and embedded devices and in real-time environments. At the same time, Java SE provides the basis for Java EE.

2.Java EE (formerly known as the Java EE)--java Platform Enterprise Edition. Built on a Java SE, it provides Web services, component models, management, and communication APIs that can be used to implement enterprise-class object-oriented service architectures (service-oriented Architecture,soa) and Web2.0 applications.

3.Java ME (formerly known as J2ME)--java platform Mini-version. is a highly optimized Java operating environment that provides a Java-based development and application platform for embedded consumer electronics such as set-top boxes, mobile phones, and PDAs.

Java Learning to organize notes (i) Java understanding

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.