Blog Archives

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 of an array is an integer. The maximum value of

Read more ›

Posted in Exception Handling, Memory Management

06: Capture throughput & latencies with “Metrics Core” tutorial

“Metrics Core” is a very handy framework to gather insights & tune performance of high-throughput and low-latency services. Here is a very simple core Java multi-threaded application that gathers metrics with this library. Step 1: Create a maven project Press enter for all prompts to use the default values.

…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Low Latency, member-paid, Metrics Tutorial

07: Reactive Programming or Reactor pattern (RP) in Java Interview Q&As

Q1. Explain “pull” vs “push” paradigms (aka imperative/interactive vs reactive) with respect to processing data in programming? A1. Interactive/imperative Programming (Pull): is all about asking for something and getting it in return. One common pattern in this world is the iterator pattern, which loops through and pull data out of…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Low Latency, member-paid, Reactive Programming

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. It

Read more ›

Posted in jvisualvm profiling, JVM, Memory Management

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 any potential memory issues, I have used “jvisualvm”, which is

Read more ›

Posted in jvisualvm profiling, JVM, Memory Management

05: Java primitives & objects – memory consumption interview Q&A

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. It depends. 1) Primitives defined locally would be on the stack.

2) If a primitive is…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Data types, JVM, Low Latency, member-paid

♦ Is it a valid binary search tree (BST) ?

Q. Write code test if a given tree is a binary search tree (i.e. BST)? A. A binary search tree (BST) is a binary tree where each node satisfies the following conditions: 1) key in any node is larger than the keys in all nodes in that node’s left subtree…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Coding, member-paid, Tree structure

Huffman coding in Java

This is a very decent coding exercise to sharpen your coding skills. Nicely explained with diagrams and complete code. Q1. What is Huffman coding? A1. Huffman coding is a compression technique used to reduce the number of bits needed to send or store a message. For example, if you have…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Training, 90-Day-Java-JEE-Career-Training, 180-Day-Java-JEE-Career-Training, 365-Day-Java-JEE-Career-Training, 60-Day-Java-JEE-Career-Training and 2-Year-Java-JEE-Career-Training

Want to evaluate the quality of the contents to see if they will add value to you?

Click Here and check the contents with Try.

Log In | Register
Posted in Can you write code?, Coding, member-paid
Page 1 of 1712345678910...Last »

800+ Interview Q&As ♥Free|♦FAQ (Mouse Hover for Full Text)

open all | close all

200+ Java FAQs – Memory Joggers

open all | close all

16 Java Key Areas to be a top-notch

open all | close all

80+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your "Career Skills"?

open all | close all