It is very troublesome to control office controls in Java.With jacob, things have become much easier.However, it is very troublesome to implement flexible control of word in Java.
Below we will introduce several common word objects and some typical
Use images:Now we will rewritePaintframe ()To make the image work. This also brings someThe problem is that the image is often quite large, and it takes a lot of time to draw all the images.It is through a slow connection, which is why drawimage has
AlthoughApache JServThe development team is currently engaged in Tomcat development, and Apache JServ only supportsServlet 2.0But Apache JServ is more stable than Tomcat at this stage. Therefore, Apache JServ + gnujsp is more suitable for Web
ExploitationJavaThe network capability provided by the. NET package. Take the connected stream communication method as an example,
The operations on the server are generally:
(1) create a serversocket object to listen to requests sent from the
Import Java. util. random; import Java. util. concurrent. cyclicbarrier;/*** cyclicbarrier is similar to countdownlatch and is also a counter. * The difference is that cyclicbarrier calls cyclicbarrier. the number of threads that await () enters the
original address: http://blog.csdn.net/huang_xw/article/details/7318554
/*** @ Description: the instance of the stringbuffer object accessed by thread 1. When thread 2 wants to access this object, blocking will occur. * @ author Snoopy * @ blog
TCP emergency pointers are generally not recommended and different TCP/IP implementations are also different, generally, if you have urgent data, you would rather establish a new TCP/IP connection to send data, so that the other party can handle it
Public interface cloneable
This class implements the cloneable interface to indicate that the object. Clone () method can legally copy such instances by field.
If you call the object clone method on an instance that does not implement the
The throwable class is a superclass of all errors or exceptions in the Java language. It has two subclasses: exception and error.
Error indicatesProgramA very serious error occurs and cannot be recovered or continued. Therefore, you should not
Here we will mention initialization. The reference is not provided with the default object, and its value is null.
The base class object is encapsulated in the derived class object.
Therefore, the safest way to use Java is to first call the
Package Pa;
Public class test{Public static void encode (byte [] In, byte [] Out, int password){Int Len = in. length;
Int seed = PASSWORD ^ 0xeee3a8df;For (INT I = 0; I Byte A = (byte) (in [I] ^ seed) >>> 3 );Byte B = (byte) (INT) in [I]) >>( 12-5
This synchronization must be synchronized.
The synchronization block should be as small as possible
Use wait () in a loop ()
Synchronized(OBJ ){
While(Condition ){
OBJ. Wait ();
}
}
Synchronized (OBJ) {While (condition)
The maximum efficiency of the object group is still the traditional ArrayConsidering the efficiency, Java performs a boundary check at runtime.The container class can only hold the reference, and the objects it holds are all object classes. The
deadlocks are generally caused by mutual lock wait between two objects. The following example is used to construct this situation:
Package basic. e_deadlock; import Org. apache. log4j. logger; public class testdeadlock {public static void main
Bill recently received a project to connect the client to the server on the original system. The original system was developed in Java. After the project team discussed it, it decided to applySocketClass to solve the problem. Bill is a master of C
Original article address:Http://blog.csdn.net/huang_xw/article/details/7318554
/*** @ Description: two threads (thread 1 and thread 2) access the internal synchronization method syn1 () and synchronization method syn2 () of the same object. * result:
Tcpnodelay = false. It is also the default value to enable the Nagle algorithm. The idea of the Nagle algorithm is good. It avoids small packets in the network and improves the network utilization. But when the Nagle algorithm encounters the delayed
Executors class provides a series of factory methods for creating a thread pool, and the returned thread pool implements the executorservice interface.1. newfixedthreadpoolPublic static executorservice newfixedthreadpool (INT nthreads );Public
Basically, there is no Java-only API to access hardware information. Maybe in the future, who knows?
The requirement for MAC addresses comes from UUID and a large part from license management. This is really a boring thing. I hope the software
I have never written a Java program, but it is just a theory. So I decided to write a program from Chapter 1. However, I forgot the theoretical knowledge I learned earlier. It seems that I still have to learn from practice.
This is the first article.
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