Blog Archives

01: jvisualvm tutorial to sample Java heap memory

Java does not have a sizeof operator like C++ does. Java uses automatic memory management known as the Garbage Collection, hence it is not that important to evaluate size of various objects. But, for the purpose of learning & fixing any potential memory issues, I have used β€œjvisualvm”, … Read...

Members Only Content
Log In Register Home


02: jvisualvm to detect memory leak – a quick tutorial style Java demo

This is a companion post to 8 Java Memory Management Interview Q&A demonstrating a memory leak scenario step by step with jvisualvm, which is a free profiling tool that gets shipped with JDK. Step 1: Code that causes memory leak Here is a sample code that causes memory leak. …...

Members Only Content
Log In Register Home


jvisualvm to debug deadlocks in Java

This extends JConsole for debugging deadlocks in Java applications, using jvisualvm that gets shipped with your JDK. Step 1: Java code that creates a dead lock situation by a) thread-0 holding on to lock1 and waiting for the lock2, … Read more ›...

Members Only Content
Log In Register Home


800+ Java Interview Q&As

Prepare to fast-track & go places
with multi-offers to choose from & increased earning potential. Expand your horizons along the way by taking the road less travelled.
Learn by categories on the go...
Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, etc. Some posts belong to multiple categories.
Top