Blog Archives

14: Java Thread stop, resume, suspend & interrupt interview Q&As

Q1. Why are Thread.stop, Thread.suspend and Thread.resume deprecated? A1. We already learnt that “In Java programming, each object has a lock. A thread can acquire the lock for an object by using the synchronized keyword.” “The JVM uses locks in conjunction with monitors. A monitor is basically a guardian who…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Multithreading

08: ♦ 7 basic Java Executor framework Interview Q&As with Future & CompletableFuture

Basic level Java Executor framework Interview Q&As with Future & CompletableFuture (introduced in Java 8), which you would be using very often in Java apps. Q01. What is an Executor Framework? A01.In Java 5, Executor framework was introduced with the java.util.concurrent.Executor interface. This is a framework for 1) facilitating thread-pools.…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Multithreading

02: ♥♦ What is wrong with this code? Heap Vs Stack, Thread safety & Synchronized

This post covers must know Java Multithreading basics – Heap Vs Stack, Thread-safety & Synchronization. When you have a multithreaded Java application, you need to code in a thread-safe manner. Java interviewers may ask you to detect thread-safety issues as discussed in “What is wrong with this code?“. 1.What is

Read more ›

Posted in FAQs Free, Multithreading, What is wrong with this code?
Tags: ,

10: ♦ ExecutorService Vs Fork/Join & Future Vs CompletableFuture Interview Q&A

Q1. What is the difference between “ExecutorService” and “Fork/Join Framework“? A1. The Fork/Join framework uses a special kind of thread pool known as the ForkJoinPool, which is a specialized implementation of ExecutorService implementing the 1) work-stealing algorithm, in which the idle workers steal the work from those workers who are

Read more ›

Posted in Java 8, Multithreading, Reactive Programming

Producer and Consumer Java Multi-threading code

The following code is used for demonstrating thread-safety issues on eclipse. Step 1: ProducerConsumerTest

Step 2: Producer thread.

Step 3: Consumer thread.

Step 4: ProducerConsumer logic.

Key Points 1) The wait & notifyAll methods in the java.lang.Object class is used for inter-thread communication to wait for

Read more ›

Posted in Multithreading

09: Java FutureTask example

Java 5 introduced the concurrent package for more efficient multi-threading. Q. What is the difference between Future and FutureTask in asynchronous processing? A. Future is the interface and FutureTask is the base implementation of the Future with methods to start and cancel a computation. The FutureTask provides asynchronous computation with

Read more ›

Posted in Multithreading

12: ♦ 5 Java multithreading scenarios interview questions answered

This extends Q1. Can you give some scenarios where you had used multi-threading in Java applications? Q2. Can you give some scenarios where you used the synchronized keyword in Java? A2. Firstly, you need to assume that your code is always going to be accessed by multiple threads. Scenario 1:…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in Concurrency, member-paid, Multithreading
Tags:

03: ♦ 7 Things you must know about Java locks and synchronized key word

7 Things you must know about Java locks and synchronized key word summarizes the key basics. #1. Each Java class and object (i.e. instance of a class) has an intrinsic lock or monitor. Don’t confuse this with explicit lock utility class that were added in Java 1.5, and I will…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Feel free to evaluate the quality of the contents Free FAQs | HomeTry Log In | Register
Posted in member-paid, Multithreading, Understanding Core Java
Page 1 of 212

Take the road less travelled

Fast-track by empowering yourself to choose from multiple job offers, open more doors and increase your earning potential.

800+ Java Interview Q&As – ♥ Free | ♦ FAQs

open all | close all

Pressed for time? 200+ Quick Prep

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

100+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all