java--Basic Introduction

Source: Internet
Author: User

"History"

Third-generation languages:

(1) C, Pascal, FORTRAN process-oriented language;(2) C + + process/object oriented;(3) Java cross-platform pure object-oriented language;(4). NET cross-language platform.  Fourth generation language:SQL "Features"(1) Pure object-oriented language;(2) platform-Independent language, providing the interpretation environment for the operation of the program;(3) robust language, which absorbs the advantages and disadvantages of C + +, and removes parts that affect the robustness of its program (for example, the application and release of pointers, memory).   "Operating mechanism"(1) Java Virtual Machine (JVM) the <1>java virtual machine can be understood as a CPU with bytecode (*.class) as the machine instruction (This is similar to the assembly language on the Windows platform, which can be implemented across platforms as long as it is compiled into a class file)<2> for different operating platforms, there are different virtual machines(JVM for Unix/windows/other Platform)The <3>java virtual machine mechanism masks the difference of the stratum running platform, realizes " once compiles, runs everywhere ". (C language in the better case, you can achieve "one- time programming, run anywhere ", but also must be compiled on different operating systems before you can) "Face question"is Java a compiled or interpreted language? ----Explanatory language<1>c/c++ language can be directly compiled into the operating system to recognize the format of the executable file, not the second time, this is called a compiled language;<2>java is compiled for the first time into its own executable format *.class, when the class file is executed by the JVM is interpreted line by row, generating the format of the target platform recognition.               (2) garbage collection mechanism (garbage collection) <1> memory space that is no longer in use needs to be recycled;<2> in C + +, the programmer is responsible for recovering useless memory;<3>java provides a system-level thread to track the allocation of storage space and, when the JVM is idle, checks and releases those memory spaces that can be freed;<4> garbage collection is performed automatically during the Java program run, and the programmer cannot control and intervene precisely. (the Java program will appear "card machine" situation, such as eclipse slow reaction situation, this is the dynamic garbage collection)  "Run Process"source Program (*.java file)--<java compiler >--bytecode (*.class file)--< class loader >--< bytecode checker >--< interpreter >--< operating system platform > the role of the----Javac is to compile the *.java file into a *.class file (format: Javac Helloworld.java)----Java's role is to run the program (format: Java HelloWorld) "J2SDK"----Software Development Kit "JRE"----Java Runtime Environment      

java--Basic Introduction

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.