Blog Archives

♦ Monitoring/Profiling Java applications interview Q&A

Q1 How will you go about monitoring your Java application for potential performance or memory issues? A1 1. Visual VM for monitoring Java memory, CPU, threads, etc VisualVM is a visual tool integrating several command-line JDK tools and lightweight profiling…...

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 Log In | Register | Try free FAQs | Home
Posted in FAQs Java Key Areas, member-paid, Memory Management, Performance, QoS

♦ Processing large files efficiently in Java – part 1

Q1. What are the key considerations in processing large files? A1. Before jumping into coding, get the requirements. #1. Processing a file involves reading from the disk, processing (e.g. parsing an XML and transforming), and writing back to the disk.

Posted in IO, Memory Management, Performance Tagged with:

01: jvisualvm 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

Posted in jvisualvm profiling, JVM, Memory Management

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

Posted in jvisualvm profiling, JVM, Memory Management

10: ♦ 8 Java Maps & Caching Data in Java Interview Q&As

Q1. What is the purpose of a Map interface in Java collection API? A1. A map is a set of associations between pairs of objects. One is known as a “key” and the other is known as a “value”. It…...

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 Log In | Register | Try free FAQs | Home
Posted in Collection and Data structures, member-paid, Memory Management, Performance

8 Java memory management interview Q&A

Q1. Are memory leaks possible in Java, which has memory management via automatic Garbage Collection? A1. Memory and resource leaks are possible in any robust application. In managed languages such as Java and C#, the developers do not have to…...

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 Log In | Register | Try free FAQs | Home
Posted in FAQs Java Key Areas, member-paid, Memory Management Tagged with:

Java String & Array limitations and OutOfMemoryError

Q1. What is the maximum possible length of a Java String & how much heap space do you need to store the maximum possible String object? A1. A Java String internally uses a char array (i.e. char[]) and the indices

Posted in Exception Handling, Memory Management

javap, jps, jmap, and jvisualvm tutorial – analyzing the heap histogram

Q1. Is there anything wrong with the code snippet shown below? A1. The above code creates too many “Integer” objects due to auto boxing. Q2. How do you know that the above auto unboxing and boxing code were executed? A2.

Posted in Memory Management, Performance

Learn by Java topics ♥Free | ♦FAQs

open all | close all

100+ Java Tutorials by topics

open all | close all