Java Interview Common Questions

Source: Internet
Author: User

1. String S1 = ' 123 ';

String s2 = new string ();


2. The difference between two ways of implementing multithreading

Inheriting the thread and implementing the Runnable interface


3. Single-column design mode What's the difference between lazy and a hungry man? * * *

Lazy style Features: lazy loading. Delayed loading in multi-threaded security problems, through the addition of synchronization to solve, plus synchronization efficiency is low, with a double-judge method to solve the low efficiency. The byte-code object (i.e., the class file) is used when synchronizing. 11 days-14-multithreading (multithreading-Singleton design mode-lazy type)


4. Write a deadlock program * * *


Java Interview Common Questions

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.