Multithreading
1. A thread is an execution path in a process. A process is a program that is running in the system. (Access is a static concept, and threading is a dynamic concept.) )
2. How to open a new thread:
A, inherit the thread class, and
Equals is a method in the Object class. Determine whether the two objects are the same. Defined as x. queals (y). If x and y are the same object, true is returned.
Otherwise, false is returned.
J2set provides classes that overwrite the queal usage
1: static import is very simple, for example:[Java]Import static java. lang. Math .*In this way, you can directly use various methods in Math, such as abs, instead of using Math. abs.2: variable parameters ()First, let's look at the
Jce. jarSecurity/US_export_policy.jarSecurity/local_policy.jarExt/sunjce_provider.jarThese packages are automatically loaded during Java runtime. Therefore, applications with the main function do not need to be set to the CLASSPATH environment
Array OverviewDeclaration of a one-dimensional array、creation of Array objectselement is an array of reference data typesarray Initialization (1)array Initialization (2)default initialization of array elementsreferences to array elements Public
Structural Design of a program: a structured programming language that emphasizes the use of modular and modular components to build a program. The structured program design method can make the logic structure of the program clear, hierarchical,
The concept of exceptionsClassification of exceptionsexception capture and handlingImportJava.io.*; Public classTestEx { Public Static voidMain (string[] args) {Try { NewTestEx (). F2 (); } Catch(IOException e) {e.printstacktrace (); }
Method overload overloadvoid Max (int a, int b) {}void Max (float A, float b) {}Testoverload.javaCreation and use of objectsTestcircle. JavaStack heapthis keywordStatic keywordCat.javaStack: local variable Cat mimiHeap:id NameData seg: (static)
Object orientedObjects and classesStaff Category: Staff a staff B ....Relationships between classesAssociation Relationship: Association Relationship (weak)Inheritance relationship: xx is a kind of xx (tree)AthletesBall PlayersFootball
The four abstract classes and their relationships in the Java.io package are briefly understood above, and further summarize them and their subclasses.At the end of the previous blog, posted the entire IO family in Java, and then the small and
The concept of Io stream An IO stream is an abstraction that flows from one point of data to another, as if the water flowed from the end of the pipe to the other end. In the program, all the data is transmitted and saved in a stream way. All of
When serialization encounters inheritance...When a parent class implements the Serializable interface, its sub-classes are automatically serialized.This is verified as follows:Package Serial;Import java. io. Serializable;Public class SuperC
When to accept the default java serialization behaviorFirst, you need to understand the default serialization behavior of java. java saves all information about the object. That is to say, in some cases, those that do not need to be saved are also
The object to be saved is also saved. Generally, we only need to save the Logical Data. You can use the key word transient to mark the data that does not need to be saved.The following is an example:Import java. io .*;Public class Serial implements
1: Concept of exceptions:
An exception is an event that occurs when the program is executed (an exception occurs during running ).
The program encountered an error and interrupted the original execution process.
2: Exception Handling in
1: transformation between basic data and encapsulation types
A: Basic Data Type ---> encapsulation type (object type)
Boolean boolean_1 = new Boolean (true );
Byte ----> byte
Short ----> short
Char ----> character
Jdk6 RC has been released recently, but it is too late to use the new features of jdk5. Although it has not been used yet in the project, you can write some demos to experience the charm of tiger, the present era is the era of experience. Everything
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.