I planProgramChanged to multi-thread. Several items are found in the test to reflect the changes. first look at them.CodeRight:
Class testmain extends thread { Public testmain () { super ("current thread 1 "); } Public void run () { for (INT
A variety of design patterns are used in the proxy categories that contain the ACCESS database generation: Factory method, number of access objects, various ORM technologies (hibernate, EJB );
MVC:
M: model. Represents the applicationProgramIs
There are six classes in total. The main database class is dbconn. Java, the sub-classes are dbquery. Java and dbupdate. java. The factory classes are dbstore. Java, dbquerystore. Java, and dbupdatestore. java.
Dbconn. Java code:
Package com.
Singleton mode is a common design mode. in the book "Java and mode", Dr. Yan macro makes a comprehensive summary of Singleton mode.
There are three Singleton modes: lazy Singleton, hungry Singleton, and registered Singleton.
The Singleton mode has
You may already know the following facts about the Java Collection framework:
The vector is thread-safe, and the arraylist is not
The read operation of arraylist is faster than the append operation of explain list. The append operation of
1. String A = "ABC" and string a = new string ("ABC") are different
The test code is as follows:String A = "ABC ";String B = "ABC ";System. Out. println (A = B );Output: True======================================String A = new string ("Ade ");String
Problem:When the system creates a group of related or interdependent objects, use the abstract factory mode.The abstract factory mode can provide an interface to the client so that the client can create product objects in multiple product families
1. Use the singleton whenever possible
The use of Singleton can reduce the load burden, shorten the loading time, and improve the loading efficiency, but not all of them are applicable to singleton. Simply put, the Singleton is applicable to the
The previous examples are provided for everyone to learn. As we all know, spring's AOP function actually implements Java's dynamic proxy function, the following describes the Java Dynamic proxy, the implementation of AOP by cglib in spring, and
When developing mobile apps, you always want to compress the information transmitted over the network to reduce traffic. This article is only guided by the Harman encoding to implement compression functions.
You may think that the program and a
In C/C ++ development, you need to manage the memory yourself. Java, with the help of the Automatic Memory Management Mechanism of JVM, no need to write the paired Delete and free code for each new operation. However, due to memory leakage and
Public, private, and protected display the attributes and service types of the three types. Public is accessible at will, and private is inaccessible from the outside (showing data encapsulation) and protected indicate that the data is protected.
I often see some arguments about Java and. net. For example, http://www.cnblogs.com/hack/archive/2010/05/30/1747513.html. There is a debate that is a good thing. In a vigorous environment, there should be various voices. Do you not see the spring,
I recently bought a machine as a source server and a few friends from other places to do something to play. However, due to the use of China Telecom's ADSL, the address is dynamic and changes every day when the machine restarts automatically. So I
Today, I went to javaworld.com.tw and saw someone asking about thread synchronization. Recently I am very interested in multithreading and have written many similar programs. So thread synchronization is definitely required, synchronized is used in
I have read some program code written in Java over the past few days and found many API functions that I did not know before. I thought I was still an intermediate Java language learner. Now it seems that I am only a beginner Java learner. My
I usually have few opportunities to write io-related code, but I know that bufferedxxxx is highly efficient in reading and writing. I didn't expect that there are so many traps in it. These two days I was suddenly tossed by one of the traps: read a
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