Multithreading Interview Question-1

Question 1. What is Thread in java? Answer. Threads consumes CPU in best possible manner, hence enables multi processing. Multi threading reduces idle time of CPU which improves performance of application. Thread are light weight process. A thread class belongs to java.lang package. We can create multiple threads in java,…

Continue reading

Java Memory and Performance Interview Questions

This post is a compilation of many useful articles available on Internet.Their references can be found at the end of the post. Java Memory and Performance Improvement tips: How would you improve performance of a Java application? Pool valuable system resources like threads, database connections, socket connections etc. Emphasize on…

Continue reading

Race condition in Java multi-threading

Race condition occurs in a multi-threaded environment when more than one thread try to access a shared resource (modify, write) at the same time. Note that it is safe if multiple threads are trying to read a shared resource as long as they are not trying to change it. Since…

Continue reading

Interview Question and Answer on Threading-2

1. What do we understand by the term concurrency? Concurrency is the ability of a program to execute several computations simultaneously. This can be achieved by distributing the computations over the available CPU cores of a machine or even over different machines within the same network. 2. What is the…

Continue reading

Inteview Question and Answer on Threading

What is race condition in java A race condition is a situation in which two or more threads or processes are reading or writing some shared data and their is no proper synchronization which result in unexpected output.Therefore, the result of the change in data is dependent on the thread…

Continue reading

Top Java Questions and Answer

1. What is the purpose of garbage collection in Java, and when is it used? The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage…

Continue reading

Top Constructor Interview Questions

What is a Constructor? Constructor is a special method given in OOP language for creating and initializing object. In java , constructor role is only initializing object , and new keyword role is crating object. What are the Rules in defining a constructor? Constructor name should be same as class…

Continue reading

Interview Questions on OOPS

20 Core OOPS Questions and Answers What is an Object ? Well It is the most basic concept and a key to understand the Object-Oriented programming . Object is an entity that has two characteristics , State and Behavior . Some examples of real world object can be : Bike…

Continue reading

Top 20 Java Basic Interview Questions

1.What is the most Important feature of java? Java is platform independent language. 2.What do you mean by Platform Independence? Platform Independence you can run and compile program in one platform and can execute in any other platform. 3.What is JVM(Java Virtual Machine)? JVM is Java Virtual Machine which is…

Continue reading