Recently in the bug fix program, found that the background throws the following exception:Exception in thread "main" Java.util.ConcurrentModificationExceptionat java.util.hashmap$hashiterator.nextentry ( hashmap.java:793) at
Recently in the study of design patterns, the experience of each learning to record down, keep their own future use! (Example own Baidu)1. Policy mode
Where applicable
Use when the user is in use to switch algorithms at any time, for example:
Why avoid creating unnecessary objects? The process of creating objects is still more cost-intensive, according to the performance tests given in the book, the time consuming to recreate objects is 250 times times the time consumed by reusing
There are many ways to implement a paging implementation, such as jquery's own frame pagination or a class pager in Java encapsulation. write an easy-to-understand paging algorithm Logic:
//Step 1: Set pages per page size
long pageSize = ten;
http://xyzroundo.iteye.com/blog/1116159 about absolute paths and relative paths: absolute paths are the real paths on your home page for files or directories on your hard disk, (URLs and physical paths) For example: C:xyz est.txt Represents the
I installed the JDK under C:\Program files.The IDE startup script Startup.bat for example:If "%os%" = = "Windows_NT" setlocalSet Nc_home=%~dp0Call%nc_home%\bin\uapsetupcmdline.batIf not "%1%" = = ""
Java object Integer cannot reference delivery /*** The value of the integer. * * @serial */ Private Final intvalue; /*** Constructs a newly allocated Integer object that * represents the specified int value. * * @paramValue the
Go from blog address: http://www.cnblogs.com/gw811/archive/2012/10/10/2718331.html Java API Java.io.Serializable Interface Source code:1 public interface Serializable {2}The Java.io.Serializable class enables its serialization functionality by
There had been such a doubt:It is said that in Java, classes loaded by different ClassLoader are located under different namespaces in the virtual machine, and classes under different namespaces are not visible to each other.This gives me a puzzle:
If you want to implement multi-threaded downloads, you can define the following steps:1) Create URL object (URL represents Uniform Resource Locator)URL url=new url (path);//path Resource Path2) Gets the URL object that points to the size of the
This is described in the API. SemaphoreSemaphore is typically used to limit the number of threads that can access certain resources (physical or logical).A count semaphore. Conceptually, semaphores maintain a set of licenses. If necessary, each one
The For loop in Java has a--foreach notation (typically used only to traverse the entire array, without worrying about cross-border issues).1.1) General wording:Package Foreach.main.sn;public class foreach {public static void main (string[] args)
A: PrefaceRecently, because of the interview Sina Company, the interviewer asked me questions I do not know, feel good food, so recently decided to put the Java Foundation again, really feel good food. A little bit every day, the guy said, "Java
[NHibernate] Delayed LoadingLazy Load is the default Loading Method for Hibernate3 associated objects. The delayed loading mechanism is proposed to avoid unnecessary performance overhead, the so-called delayed loading means that data loading is
Java concurrent programming-difference between Latch and BarrierThe reason why Latch and Barrier are put together is that they give people a similar feeling. They all block some behaviors until an event occurs, but Latch is waiting for an event,
Simple use of gson, simple use of gson
Generate a Json string Gson gson = new Gson (); List persons = new ArrayList (); for (int I = 0; I
Json conversion object
Person person = gson.fromJson(str, Person.class);
Json to list generics:
List ps =
Java Singleton mode (thread security, high efficiency, dual judgment)This method avoids the thread lock when obtaining the single benefit, resulting in slow access to this method,Likewise, this method prevents multiple instances from being generated
The Socket process handles interrupted system calls and EINTR error handling returned by the Accept FunctionWe use slow system calls to describe system calls (function calls) that may be blocked forever, such as accept and read. Permanent blocking
[Spring-boot] quickly builds the spring-boot microframework and spring-boot
Spring-boot is a framework for rapid environment construction. Its design philosophy is to minimize xml configuration and simplify the initial setup and development process
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