Java design mode-singleton mode and java Design Mode

Source: Internet
Author: User

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.

 

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.