IO Byte Stream (Java Foundation)

There is nothing right or wrong in the world. Everything is just a measure of right or wrong! Article Directory Overview of IO concept Diagram Byte Stream Summary Byte Output Stream FileOutputStream class Byte Input Stream Byte Input Stream Reads Byte Data Use Byte Stream to Read Chinese Problems Overview of IO ...

Posted by powlouk on Thu, 09 May 2019 19:10:40 -0700

Understanding String, StringBuffer, StringBuilder Differences and Source Code Implementation

Difference 1. String is a constant, StringBuilder, StringBuffer is a variable. 2. The methods and functions in StringBuffer and StringBuilder are completely equivalent. 3. Only the methods in StringBuffer mostly adopt synchronized keywords to modify, so they are thread-safe. StringBuilder, without this modification, can be consi ...

Posted by nati on Mon, 06 May 2019 00:15:39 -0700

JVM Series: In-depth explanation of JVM memory overflow analysis!

JVM memory overflow 1. heap memory overflow The main storage objects and arrays are in heap memory. As long as these objects are created continuously and there is a reachable path between GC Roots and objects to avoid garbage collection and collection mechanism clearing these objects, when the space occupied by these objects exceed ...

Posted by slobodnium on Thu, 02 May 2019 20:50:38 -0700

Java Reflection Reflection and Others

Reflection is a relatively low-level content. In the future, you hardly write it yourself? Why? Because you will use various frameworks, the underlying implementation of the framework is reflection. Learning today's content will help you understand the implementation mechanism of the framework. To lay the foundation for the fram ...

Posted by darga333 on Tue, 30 Apr 2019 14:40:36 -0700

A seemingly simple but not simple singleton pattern

Introduction Today, I saw an article on the Public Number, which asked me how to implement the singleton mode without using synchronized and Lock locks. To be honest, before that, only two implementation modes of the singleton mode were known, and none of the others had been seen at all. Today, it's an eye-opening day. It's st ...

Posted by slj90 on Wed, 24 Apr 2019 10:42:35 -0700

Java thread pool "eaten" thread exception (with source code analysis and solution)

Preface Today, I encountered a bug. The phenomenon is that a task is put into the thread pool, which seems to be "not executed" and the log is not typed. After debugging the local code, it was found that NPE was thrown in the first half of the task logic, but there was no try-catch in the outer part of the code, which led to the excep ...

Posted by fresch on Wed, 24 Apr 2019 09:30:35 -0700

Handwritten Realization of One-way Link List

Data structure is a necessary knowledge for a programmer. Although he has known these data structures before, he always feels that he does not know all the data structures at his fingertips. Therefore, the author intends to implement various data structures by hand in order to learn the whole picture of these data structures. ...

Posted by jayshadow on Mon, 22 Apr 2019 19:45:33 -0700

Five Ways to Create Objects in Java

Original address: http://geek.csdn.net/news/detail/187272?ref=myread As Java developers, we create many objects every day, but we usually use dependency management systems, such as Spring, to create objects. However, there are many ways to create objects, which we will learn in this article. There are five ways to create objects in Ja ...

Posted by rilana on Sat, 20 Apr 2019 14:54:33 -0700

Three Agent Ways of Spring

I. Static Agent The proxy object implements the same interface as the target object. eg: //Save user UserDao(save)Direct preservation UserDaoProxy Add transaction processing to the save method IUserDao.java Target Object Implementation Interface public interface IUserDao{ void save(); } UserDao.java Target object public cl ...

Posted by latvaustin on Fri, 19 Apr 2019 23:48:33 -0700

(Reprint) java Operates word Documents (jacob)

Reproduced from http://wibiline.iteye.com/blog/1725492 For project needs, users download word documents from the system, which are limited and encrypted. Users can only fill in content in a fixed location. The system is now required to verify whether the uploaded attachments are downloaded from the system. Idea: Documents on the syste ...

Posted by kagedwebdesign on Fri, 19 Apr 2019 10:21:34 -0700