Category: Java Multithreading

Collection of Java Multithreading interview questions and answers with example and notes asked in IT Industries.

What is Synchronization in Java and why it is important?

Answer includes about what is synchronization in java multithreading and when do we use it or why it is important. Synchronized meaning, concept and program example explained with or without synchronization. This concept will help understand why to use thread synchronization in java multithreading. Answer: What is synchronization in java? Synchronization in java multithreading is…

Read the full article

Difference between process and thread in Java Multithreading?

Answer:Difference between process and thread in java multithreading listed below is applied to all languages i.e. Java, C, C++ and C# etc. Here are 4 major important differences are described. 1)Processes are heavy-weight and threads are light-weight. Heavy –weight: each process shares different virtual address space. Light-weight: each thread shares same virtual space. Means, threads…

Read the full article

What is difference between start and run in Java Thread?

Answer includes the difference between start and run Describing the interview question, difference between run and start method in Java multithreading with example. But, also note that this question can also be asked as  below “if start() method eventually call run() method in a thread then why don’t we call run() method directly?” Answer: Thread.start()…

Read the full article