30 basic concepts that Java need to master

xiaoxiao2021-03-06  24

(1) Easy: Java's grammar is relatively simple than C , and another aspect is that Java can run software on a small machine, the basic explanation of its support for the support of its support is about 40KB, increasing basic standard libraries and The memory supported by thread needs to increase 125KB.

(2) Distributed: Java has a very powerful routine library of TCP / IP protocol, and Java applications can pass the network through the URL to access the remote object, due to the appearance of the servlet mechanism, making Java programming very efficient, Now many large web server support servlet.

(3) OO: Object-oriented design is a programming technology on an interface of objects and objects. It has a lot of object-oriented and C , in relation to multiple inheritance and the original model of Java.

(4) Runtight: Java adopted a safety pointer model to reduce possible types of rewriting memory and data crash.

(5) Safety: Java is used to design a network and distribution system, which brings new security issues, and Java can build antivirus and anti-attack SYSTEM. Facts prove that Java is better in this area of ​​the Antirate.

(6) Neutral Architecture: Java compiles its generating architecture neutral target file format can be executed on many processors, and the compiler generated command bytecode (Javabytecode) implements this feature, this byte code can be on any machine Explanation execution.

(7) Portability: The size and algorithm of the basic data structure type in Java have strict regulations, so the portability is very good.

(8) Multithread: Java processing multi-threaded process is simple, Java is handed over to the bottom operating system or thread program to complete the multi-thread implementation. So multithreading is one of the popular reasons for Java as a server-side development language.

(9) Applet and servlet: The program that can be executed on the web page called Applet, which needs to support a lot of browsers in Java, and Applet supports dynamic web pages, which is what many other languages ​​cannot be done.

basic concepts

1. The only relationship between the Object is what the object's interface is, just like the computer's seller, she doesn't matter what the internal structure of the power supply is, he only does it provide you with electricity, but just know that CAN or Not is not HOW and why. All programs are composed of certain properties and behavior objects, and different objects access through function calls. All communication between the objects is called by way of ways, through the package object data, large. Improve the reuse rate.

2. The most important idea inoo is class, class is a template is a blueprint, constructed from the class, which is created an instance of this class (Instance).

3. Package: Incoming data and behavior in a package) and the implementation process of the object user hides the data, and the data in an object calls his instance field.

4. By expanding a class to get a new class called inheritance, and all classes are extended by Object roots, and the root super class will be introduced.

5. 3 main features of the object

Behavior --- Description this object can do.

State --- Reflection of the object when the object is applied.

Identity - distinguishes with other similar behavior objects.

Each object has a unique Indentity and the three interacts between these three.

6. The relationship between classes:

Use-a: dependency

HAS-A: polymerization relationship

IS-A: Inheritance Relationship - Example: A Class A inherited Class B, at which time A category not only has a Class B method, but also its own method. (Personality exists in commonality)

7. Construction Objects Use a constructor: Presented, the constructor is a special method, constructing the object and initializes it.

Example: Data class constructor is called DATA

New Data () --- Constructs a new object and initializes the current time.

Data happyday = new data () - The value assigns an object to a variable happyday, so that the object can be used multiple times, and the value of the variable and the object variable is different. NEW is one. Quote. Constructor Features: The constructor can have 0, one or more parameters

The constructor and the same name have the same name

A class can have multiple constructors

The constructor does not return value

The constructor is always used with the New operator.

转载请注明原文地址:https://www.9cbs.com/read-52804.html

New Post(0)