GC is the meaning of garbage collection (garbage Collection), memory processing is where programmers are prone to problems, forgetting or wrong memory recycling can cause program or system instability or even crashes, The GC functionality provided
1, an object from which a sequence of bytes can be read into an input stream, an object to which a sequence of bytes can be written to do the output stream. The source of these byte sequences can be a file or a network connection or a block of
Finalizers is unpredictable, often dangerous, and generally unnecessary.
In Java, the GC automatically reclaims the space associated with an unreachable object without requiring the programmer to do the work.For non-memory resources, we
Java Sync Lock (synchronized)in Java, synchronized is a lock, he can lock a method, can also lock a method, I wipe, in fact, these two things are the same. Block is not a method without a name, the method is a name of the block. This article uses
I. OverviewCapture the internal state of an object without destroying it, and save the state outside the object so that it can be restored to its previously saved state. It is an object-behavioral pattern .Second, the application scenario1, similar
Requirement: Double type data interception operation retains two decimal placesSolution:1 Java.text.DecimalFormat df =new java.text.DecimalFormat ("#.00"); 2 Df.format (the number you want to format);Can also be written as a sentence: 1 new
See the code today see a JavaBean implementation of the Serializable interface, which is the identity class interface, there is no method or constant, find the following blog deliberately recorded.Reprint: http://www.cnblogs.com/gw811/archive/2012/10
1, what is multithreading? A program can perform multiple tasks, each of which is called a thread, and a program that runs multiple threads is called a multithreaded program.Process: A program that is in progress (literal translation).Thread: A
Advantages:1, save the configuration, reduce the configuration file size2, compile to see the correct or not, improve efficiencyDisadvantages:1, increase the coupling of the program, because the annotations are stored in the class file, and more
I. OverviewThe interface is located under the Java.util.concurrent package, declared: Publicinterfacecallable V - Call The result type of the methodA task that returns the result and may throw an exception. The implementing person defines a method
This article simply wrote a Java verification code, for the previously written SPRINGMVC registration function plus Verification code, the role of verification code is not much to say, to prevent the bot malicious registration and so on.Where
1, double Java.lang.Math.floor (double A)Returns the maximum double value (closest to the positive infinity direction) of an integer that is less than or equal to the parameter A in a mathematical sense, special case:If the parameter value equals a
1. Differentiate Overloaded methods:The order of the parameters can be distinguished by two methods, however, in general, do not do this because it makes the code difficult to maintain the overloaded method cannot be distinguished by the return
The symbols commonly used in regular expressionsAlthough you can use the string function to complete validation, this validation is not rigorous enough and is cumbersome to write. A regular expression is an object that describes a character pattern,
Example of CountDownLatch and countdownlatch
CountDownLatch is a synchronization helper class, which is like a countDown counter. when an object is created, the initial value is set through the constructor. The await () method of the CountDownLatch
Java thread details
Java uses two methods of thread usage:
1. inherit from Thread
2. Implement Runnable
Some methods in the thread:
Wait ():
The method of the Object class. Calling the wait method for this Object causes this thread to discard the
Spring instantiates Bean using the static factory Method
Knowledge Point introduction:Static factory, as its name implies, is to call the static factory method to obtain the desired objects. To allow spring to manage all objects, we cannot directly
Shell script: Determine whether a user or user group already exists/create a user or user group
Generally, as a deployment script for an application, the first task is to create a dedicated user and user group for the current application. This
Java. util. logging. Logger Usage Details, java. util. loggingJava. util. logging. logger is nothing new, and it will be available in 1.4. But because of the existence of log4j, this logger has been silenced. In fact, in some testing code, the built-
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