Java design mode-singleton mode and java Design Mode
From the beginning of spring festival!
I'm so drunk that I care about mountains and rivers!
Every day, I am opening a new blog with two irrelevant poems! Small editors are the best in the field of code literature, and the best in the field of literature !! In any case, the first blog was born like this. It was a bit uneasy and excited. I hope that the technical experts will criticize and advise me a lot, and I hope that the technical experts will discuss and exchange more.
Test main method:
Output result
Test master Method
Output result:
Summarize the differences between lazy and hungry:
The feature of the hungry Chinese mode is slow in loading classes, and the object retrieval speed during running is relatively fast. The Lazy Chinese mode is opposite!
Of course, there are some differences in thread. I will write an article on thread in the future.