Skip to content

Gopi Gorantala

I'm Gopi — 15+ years in Java, building Kafka and Flink platforms for banks, where one lost event is a financial discrepancy. I write javahandbook.com because the guides I needed didn't exist. Everything here is tested against a real cluster first.

Printing To The Console in Java

Introduction Printing something on the console or panel that displays important messages, such as errors, messages, or data outputs, directly for developers. In Java, you can print to the console using the System.out.println() method. Here's a simple example: System.out.println(100); prints 100 on the

Members only

Leetcode 217: Contains Duplicate

This lesson will teach you how to find the duplicate element using a hashing algorithm.

Members only

Leetcode 121: Best Time To Buy and Sell Stock

Leetcode 121: Best Time To Buy and Sell Stock
Paid

Blind 75 LeetCode Problems: Detailed Solutions

Differences Between JDK, JRE, and JVM?

Short answer JDK, JRE, and JVM are essential components of the Java platform, each serving a distinct purpose. Here are the key differences between them: 1. JDK (Java Development Kit): The JDK is used by developers to write, compile, and debug Java code. 2. JRE (Java Runtime Environment): End-users

Difference Between String and char[] in Java

Short answer Strings String is an object with many helpful methods. String class in Java's standard library is designed to handle text as a sequence of characters. A string of characters (string object) is non-modifiable or immutable in Java. Once you've created it, you cannot

What is an Object class in Java?

Short answer Object class is the super class of every class you can create. In Java, a class extends another class using the keyword extends. If you don't have any other class to extend, that's fine. The compiler will make your class extend the Object class.

What is the JVM? With Sketches and Examples

Short answer JVM stands for Java Virtual Machine. JVM is a virtual machine( a piece of software) that executes Java bytecode. It provides a runtime environment for executing Java applications. The above sketch explains how the same bytecode is run across multiple virtual machines on different operating systems. If someone

What Are Wrapper Classes in Java?

This is the most asked interview question! Why do we use wrapper classes to store data for a model class instead of primitives? What are wrapper classes? Primitive wrappers, also known as wrapper classes, are a set of classes in Java that provide an object representation for the primitive data

Why Are Wrapper Classes Preferred Over Primitives?

We know a class will have fields and methods to act on them in Java. The key thing about primitive data types is that they store data only. That is very cool, but if we want to do some operations, they cannot provide methods to operate on them. wrapper classes