Blog Archives
Page 1 of 2
1 2

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


04: Java primitives & objects memory consumption

Q1. How much memory space does a primitive type int occupy in Java? A1. 4 bytes. Q2. Java objects get stored in the heap memory space, but how about the primitive variables? A2. … Read more ›...

Members Only Content
Log In Register Home


06: 10+ Atomicity, Visibility, and Ordering interview Q&A in Java multi-threading

Q1. Why is it important to understand the difference between the “JVM memory model” and the computer “hardware memory model”? A1. 3 reasons why it is important to understand the JVM memory model and computer hardware memory model are: 1) JVM memory model and the physical hardware memory model architectures...

Members Only Content
Log In Register Home


3 Java class loading interview Q&As

Q1. What do you know about Java class loading? Explain Java class loaders? A1. Class loaders are hierarchical. Classes are introduced into the JVM as they are referenced by name in a class that is already running in the JVM. So, how is the very first class loaded? … Read...

Members Only Content
Log In Register Home


Page 1 of 2
1 2

800+ Java Interview Q&As Menu

Top