Basic Java Knowledge

Source: Internet
Author: User

Java Overview

Benefits of the Java language, reusability, reliability, abstraction and encapsulation, inheritance, polymorphism

    • Reusability: A well-designed class can be used in some or all of the development programs in the future. First, an already existing class can exist as an object in the member variable of a new class, and second, the interface and the superclass can pass their own methods or member variables to subclasses through implementation (implements) and inheritance (extends).

    • Reliability: Each class can be tested and maintained as a single test unit, and the newly developed class is built on a mature library, making the program more reliable.

    • Abstraction and encapsulation: The purpose of abstraction and encapsulation is to separate the implementation code from the invocation, so that the user can only use a feature and not how it is implemented. When modifying the implementation logic, developers only need to modify the logic code, and do not need to change the user's call interface, it is very convenient.

    • Inheritance: Adds new properties and functionality to existing classes, producing a new class that embodies the reuse of code.

    • Polymorphism: The same information is received by different objects resulting in different behaviors, which are embodied in dynamic bindings.

        java language Features, object-oriented, security, platform agnostic, multi-threading, memory management

    • Object-oriented: The whole idea of Java programming is based on object-oriented.

    • Security: Java uses the word "reference" (or a handle) instead of a pointer, in actual programming, the developer cannot directly manipulate the physical address, to a certain extent, to ensure the security of the program.

    • Platform-agnostic: Java programs run in the JVM, run once in a compilation, and can be found in the relevant sections of the JVM.

    • Multithreading: Java is the language of built-in multithreading support, which makes multithreaded programming with Java simple.

    • Memory management: The JVM has a built-in garbage collector that can reclaim useless memory, as detailed in the relevant sections of the JVM.

The JVM is the environment in which Java programs are executed, and the JVM execution environment is mainly summarized as:

    • The Java file is compiled by the compiler (Javac.exe) into a byte-code class file, and then there is an interpreter (Java.exe) explaining the execution of the. class file

    • Debugger (JDB) C file Generation tool (Javah)

        java usage Scenarios in application,applet,servlet,jsp and JavaBean, script

    • Application is a program running in the JVM that must use the Main method as the entry for the program.

    • Applets are embedded in the Web page of the Java applet, applets and application operating environment, the applet itself does not have a portal, can only embed HTML files, and run with Appletviewer. Note that the applet cannot read and write to the client, it only works on the server and the client.

    • The Servlet runs on the server side, which responds to client requests and extends the functionality of the servers. All servlets must implement the Servlet interface, and the servlet has two abstract classes, Gernericservlet and HttpServlet, so most servlets are inherited by these two abstract classes.

    • JSP and JavaBean JSP 10 multi-servlet technology extension, used to set up HTML and Java programs together, in most cases JSP can be exchanged with JavaBean.


This article is from the "11869812" blog, please be sure to keep this source http://11879812.blog.51cto.com/11869812/1827905

Basic Java Knowledge

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.