Java Study Notes (1) Java recognition and java notes

Source: Internet
Author: User
Tags character classes

Java Study Notes (1) Java recognition and java notes

1. Java introduction:

Java technology consists of the Java language, Java Runtime Environment, and Java class library. (Generally, it does not differentiate the part)

That is to say, Java is not only a programming language, but also a complete platform. It has a large set of development class libraries (including a lot of code that can be reused) and provides a cross-platform execution environment for portability, automatic garbage collection, and security services.

1. Java language:

Like other programming languages, it defines a set of syntax specifications for programming.

2. Java Runtime Environment:

Java Runtime Environment (JRE) must be installed to run Java applications. A Java Virtual Machine (JVM) and some standard Class libraries must be installed in JRE ). Java applications can be executed in computer systems through JVM virtual machines.

That is, the core of the Java Runtime Environment is the Java Virtual Machine.

Java Virtual Machine (VM) is an imaginary computer platform that is simulated by software on an actual computer platform. The Java Virtual Machine has its own hardware, such as the processor, stack, and register. It also has the corresponding command system.

The source program written in Java generates a bytecode file (a file suffixed with. class) consisting of bytecode commands through the compiler ). (Bytecode commands are sequential codes that can be recognized by Java virtual machines .) The bytecode file is interpreted and executed by the Java Virtual Machine.

The Explanation means that the Java Virtual Machine is responsible for quickly translating bytecode files into the machine code of the computer platform where the virtual machine is located and running on the corresponding computer platform.

As long as you translate compiled programs into bytecode files for the first time without worrying about various heterogeneous computer platforms, you can run the program on any machine with a Java Runtime Environment, run everywhere.

3. Java Class Library:

Java contains thousands of class libraries, such as character classes, mathematics classes, thread classes, input and output classes, and database classes. That is, you can use existing classes in Java to design programs in writing code.

Ii. Java features:

1. platform independence:

Platform independence means that software programs written on a computer can run correctly on any computer platform with different operating systems and processors without modification) + CPU = platform.

That is, the idea of "one-time writing, running everywhere.

2. Object-oriented:

Java is an object-oriented programming language.

Object-oriented language is actually describing the objective world, and everything is an object.

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

3. Simplicity and security:

In Java, Java virtual machines are used to manage memory and garbage collection to avoid errors, eliminate the responsibility of programmers to reclaim useless memory space, and improve development efficiency.

Java security is also reflected in the ability to build a network application system that is anti-virus and tamper-resistant. Java can prevent various attacks, such as worms and other viruses that cause runtime stack overflow. The trojan uses spoofing techniques to access private members of objects, the memory is damaged outside the processing space of your program, and other parts of the computer are accessed without authorization.

4. multithreading:

Java supports multi-task implementation. Each task is a thread (a piece of dynamic code ). Multiple Threads take turns using resources limited processor (single-core or multi-core), the processor is assigned to each thread a short execution time segment (in milliseconds ), it seems that multiple tasks are executed simultaneously.

5. Dynamic:

You can add new methods and instance variables to the class library without affecting the execution of your program. When a Java program is running, classes can be dynamically loaded so that Java can dynamically update programs and class libraries in a distributed network environment to maintain programs more efficiently. In addition, Java supports multi-inheritance through interfaces, making it more flexible and scalable than strict class inheritance.

Iii. Java operating platform:

The Java operating platform is mainly divided into three versions.

1. Java SE (formerly J2SE)-Java platform Standard Edition. It is used to develop and deploy Java applications on desktops, servers, and embedded devices and real-time environments. At the same time, Java SE provides the foundation for Java EE.

2. Java EE (formerly known as J2EE)-Java Platform Enterprise Edition. Built on the basis of Java SE, it provides Web Services, component models, management and communication APIs, and can be used to implement enterprise-level object-oriented Service Architecture (SOA) and Web2.0 applications.

3. Java ME (formerly known as j2-java)-micro version of Java platform. It is a highly optimized Java runtime environment that provides a Java-based development and application platform for Embedded consumer electronic devices such as set-top boxes, mobile phones, and PDAs.

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.