Yearly Archives

Output of Java programs

In Java, object destruction is taken care by the Garbage Collector module and the objects which do not have...

Output of Java programs

In Java, object destruction is taken care by the Garbage Collector module and the objects which do not have...

Automatic Resource Management in Java

Java provides a feature to make the code more robust and to cut down the lines of code. This...

Automatic Resource Management in Java

Java provides a feature to make the code more robust and to cut down the lines of code. This...

Island of Isolation in Java

In java, object destruction is taken care by the Garbage Collector module and the objects which do not have...

Island of Isolation in Java

In java, object destruction is taken care by the Garbage Collector module and the objects which do not have...

Mark-and-Sweep: Garbage Collection Algorithm

All the objects which are created dynamically (using new in C++ and Java) are allocated memory in the heap....

Mark-and-Sweep: Garbage Collection Algorithm

All the objects which are created dynamically (using new in C++ and Java) are allocated memory in the heap....

How to make object eligible for garbage collection in Java?

An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes...

How to make object eligible for garbage collection in Java?

An object is eligible to be garbage collected if its reference variable is lost from the program during execution.Sometimes...

Garbage Collection in Java

In C/C++, programmer is responsible for both creation and destruction of objects. Usually programmer neglects destruction of useless objects....

Garbage Collection in Java

In C/C++, programmer is responsible for both creation and destruction of objects. Usually programmer neglects destruction of useless objects....

Java.lang.Runtime class in Java

Every Java application has a single instance of class Runtime that allows the application to interface with the environment...

Java.lang.Runtime class in Java

Every Java application has a single instance of class Runtime that allows the application to interface with the environment...

Callable and Future in Java

The need for Callable There are two ways of creating threads – one by extending the Thread class and...

Callable and Future in Java

The need for Callable There are two ways of creating threads – one by extending the Thread class and...

Java.util.concurrent.CyclicBarrier in Java

CyclicBarrier is used to make threads wait for each other. It is used when different threads process a part...

Java.util.concurrent.CyclicBarrier in Java

CyclicBarrier is used to make threads wait for each other. It is used when different threads process a part...

Reentrant Lock in Java

The traditional way to achieve thread synchronization in Java is by the use of synchronized keyword. While it provides...

Reentrant Lock in Java

The traditional way to achieve thread synchronization in Java is by the use of synchronized keyword. While it provides...