Basic review of javase (1) Deep parsing of ArrayList source code (JDK 1.8.0_92)

One of the problems we need to pay attention to when learning this piece of content is that the reference of the object is still stored in the collection, not the object itself. The List interface extends Collection and declares the properties of the class set that stores a series of elements. Using a zero-based subscript, elements can be inse ...

Posted by webpals on Sat, 30 Mar 2019 21:03:28 -0700

Java Collection Series (5) -- List Summary

Earlier, we learned the main ArrayList and LinkedList in List. Here is a summary for understanding. I. List Basic Description Let's review the framework of List first. List is an interface that inherits from Collection. It represents an ordered queue. 2 > AbstractList is an abstract class that inherits from AbstractCollection. Abstract ...

Posted by AJW on Fri, 29 Mar 2019 15:54:30 -0700

The difference between Runnable and Thread in Java

There are two ways to implement multithreading in java, one is to inherit the Thread class, the other is to implement the Runnable interface; the Thread class is defined in the java.lang package. As long as a class inherits the Thread class and overrides the run() method in this class, it can achieve multithreading operation, but a class can on ...

Posted by sandrob57 on Wed, 27 Mar 2019 01:27:30 -0700

How to make fastjson support JDK8 new time objects LocalDate, LocalDateTime in Spring Book

When fastjson is used to process JSON format conversion in Spring Book, by default, LocalDateTime and LocalDate objects in JDK 1.8 are not supported. To support these objects, you can define the relevant ObjectDeserializer to handle them and use the ParserConfig.getGlobalInstance().putDeserializer method to configure them global ...

Posted by BTalon on Tue, 26 Mar 2019 22:27:32 -0700

java multithreading (3) thread synchronization and communication

1 Thread Synchronization Thread synchronization refers to collaboration, assistance and cooperation, refers to the collaboration of multiple threads to access critical resources. Why synchronize threads? The main problem is thread visibility. How to realize thread synchronization in java? Generally speaking, there are several ways to sync ...

Posted by lnenad on Tue, 26 Mar 2019 20:45:29 -0700

Java - concurrent package details

As we all know, before JDK 1.5, in order to achieve business concurrency in Java, programmers were usually required to complete code implementation independently. Of course, some open source frameworks provided these functions, but these functions are still not easy to use. When designing concurrent Java multithreaded programs with high qualit ...

Posted by gauss on Tue, 26 Mar 2019 07:42:30 -0700

Performance optimization: Trove collection library

First meeting Trove Yesterday in Startup News See an article above: Optimizing Tips Sharing: Reduce Memory Consumption to 1/20 . In this article, I mentioned a case about how to reduce memory consumption in Java applications, and summarized his optimization process. Start by storing 1.3M Person objects, consuming 1.5GB of heap space Modifi ...

Posted by nemxu on Tue, 26 Mar 2019 03:39:29 -0700

Summary of Project Experience

1. Talk about the experience of String Utils in org. apache. commons. Lang  StringUtils.isEmpty(String str) Determine whether the string STR is empty and its length is 0, that is, STR = null & str. length = 0  StringUtils.isBlank(String str) To determine whether the string str is a blank string and whether it is 0 in length and not ...

Posted by Shovinus on Sun, 24 Mar 2019 15:42:27 -0700

java blocking queue

Blocking queues can block the current thread, such as a thread fetching elements from an empty blocking queue, where the thread is blocked until there are elements in the blocking queue. When there are elements in the queue, the blocked thread is automatically awakened without notify. This provides great convenience. I. Several main block ...

Posted by creativodev on Thu, 21 Mar 2019 23:45:52 -0700

Cglib Dynamic Agent Implementation Principle. md

1. Introduction to Cglib Library CGLIB is a powerful and high performance code generation library. It is widely used in proxy-based AOP frameworks (such as Spring AOP and dynaop) to provide method interception. Hibernate, as the most popular ORM tool, also uses CGLIB libraries to proxy single-ended associations (except for collection lazy load ...

Posted by dannau on Wed, 20 Mar 2019 11:21:28 -0700