Today encountered a large collection of data removal problems, Because it is a large collection, if it is passed to the database at the same time, it will cause the database pressure So batch operations are done in batches In fact, you can use
When observing and diagnosing the prerequisites for performance optimization of business systems, the observation tools are as follows:Front-End optimization tool: YSlowPage Response time: FirebugMethod appropriate time: BtraceGC Log Analysis: JVM
Quick sort public class Quick_sort {///Sort main algorithm private int Partition (int[] data, int start, int end) {int mid_data = data[end];/ /Select the last number as the median sentinel, from the beginning of the traversal, each number compared
foreach is a special, simplified version of a for statement, but any time a foreach statement can be rewritten as a for statement. The foreach statement provides a great convenience for programmers in terms of traversing arrays, etc.The syntax is as
Java Virtual Runtime data areaThe runtime data area mainly includes: Method area, heap, virtual machine stack, local method stack, program counter.Where the method area and the stack are thread-shared areas, the other three blocks are private areas
1. The oldest// not processed Public Static Final int process_status_untreated = 0; // has been received Public Static Final int process_status_accpected = 1; // has been processed Public Static Final int process_status_processed = 2;2, improved
There are several exceptions in Java:1) Error:java internal Error during operation;2) Exception: Exceptions that should be caught in the program.RuntimeException: errors caused by programming;IOException: Error generated by input and output.Method
[Algorithm description]Heap sorting is an improvement on simple selection sortingSimple selection sorting is to find a minimum record from N records, which needs to be compared n-1 times. However, this operation did not save the comparison of each
[Basic idea]Bubble sort is a sort of exchange, and its basic idea is to compare the keywords of the adjacent records by 22, if the reverse order is exchanged until there are no reversed records.[Java Implementation]public class Bubblesort {public
For concurrent work, you never know when a thread is running, and you need some way to avoid two tasks accessing the same resources, that is, to avoid competing resources, at least not on critical code, or that multiple threads can operate on a
Classes and objects in Java are similar to C + +, except that there are several places that require extra attention when used in a specific context. Here I list, a few main, if found, or understand more deeply, and then add.This blog post also has
The interview was asked, how is the sorting method in the collection class implemented? No answer comes up, so summarize as follows: you know what? premise: in Eclipse for your own code you can press CTRL while clicking the name to jump into the
The file input and output format in Java is not the same as in C + +, and this article is about how to implement file I/O in Java.First, determine the file object. It is best to determine if the file exists and to prevent errors when reading the
The inheritance in Java is implemented by the extends keyword, which is called a superclass, a parent class, a base class, and a class that implements inheritance, called a subclass, a derived class.Subclasses are a special kind of parent class, so
static variables and static functions (methods) in Java are similar to those in C + +. There are a few things you need to review:1) If you want to share data for all objects of a class, you can use static variables, or you can use static functions
Sun in the JAVA5, the Java thread of the class library to do a lot of expansion, in which the thread pool is one of the new features of JAVA5, in addition to the thread pool, there are many multi-threaded related content, for multi-threaded
In Java5, the lock object is specially provided, and the lock can be used to control the concurrent access of competing resources, which is mainly concentrated under the Java.util.concurrent.locks package, which has three important interfaces
Although the Java language is a typical object-oriented programming language, eight of the basic data types do not support object-oriented programming, and the basic types of data do not have "object" attributes-no attributes, no methods to invoke.
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