---
title: "Mohit jain (@jainmohit0807) | Hashnode"
description: "Senior Software Developer. Read the latest articles by Mohit jain on Hashnode."
url: "https://hashnode.com/@jainmohit0807"
---

@jainmohit0807

# Mohit jain

@jainmohit0807 · Joined July 2025

Senior Software Developer

### [Few new Features of Java 9](https://jainmohit0807.hashnode.dev/few-new-features-of-java-9?utm_source=hashnode&utm_medium=feed)

🔹 Strong Encapsulation Before Java 9: If a class was public, anyone on the classpath could use it — even if it was meant to be internal. Libraries often had “public by accident” APIs because Java had no way to hide internals beyond package-private...

7 min read · [jainmohit0807.hashnode.dev](https://jainmohit0807.hashnode.dev/few-new-features-of-java-9?utm_source=hashnode&utm_medium=feed)

[Aug 31, 2025](https://hashnode.com/posts/few-new-features-of-java-9/68b3f418b8ce8e9ca7dcc821)

### [Text Block in Java](https://jainmohit0807.hashnode.dev/text-block-in-java?utm_source=hashnode&utm_medium=feed)

What is a text block? A multi-line string literal delimited by triple quotes """ that preserves newlines and most indentation—perfect for JSON, SQL, HTML, or templates. String json = """ { "name": "Alice", "age": 25 } """; Wh...

3 min read · [jainmohit0807.hashnode.dev](https://jainmohit0807.hashnode.dev/text-block-in-java?utm_source=hashnode&utm_medium=feed)

[Aug 26, 2025](https://hashnode.com/posts/text-block-in-java/68ad8dbd798721c41303e36c)

### [Sealed Classes in Java](https://jainmohit0807.hashnode.dev/sealed-classes-in-java?utm_source=hashnode&utm_medium=feed)

Sealed classes are one of the biggest “modern Java” features that came after Java 8, finalized in Java 17 (LTS). They give you more control over inheritance and make class hierarchies safer and easier to reason about. 1. The problem they solve In Ja...

6 min read · [jainmohit0807.hashnode.dev](https://jainmohit0807.hashnode.dev/sealed-classes-in-java?utm_source=hashnode&utm_medium=feed)

[Aug 23, 2025](https://hashnode.com/posts/sealed-classes-in-java/68a9d06ee1abfbb2bb040535)

### [Introduction of Java Records](https://jainmohit0807.hashnode.dev/introduction-of-java-records?utm_source=hashnode&utm_medium=feed)

Records are another modern Java feature (finalised in Java 16) that dramatically reduce boilerplate when modelling simple immutable data carriers. 1. What problem do records solve? In Java 8, if you wanted a class that just holds data (say User with...

3 min read · [jainmohit0807.hashnode.dev](https://jainmohit0807.hashnode.dev/introduction-of-java-records?utm_source=hashnode&utm_medium=feed)

[Aug 22, 2025](https://hashnode.com/posts/introduction-of-java-records/68a861c9398d3bf504e90969)

### [Mastering PriorityQueue in Java: Use Cases, Internals & Custom Comparators](https://jainmohit0807.hashnode.dev/mastering-priorityqueue-in-java-use-cases-internals-and-custom-comparators?utm_source=hashnode&utm_medium=feed)

Get to Know PriorityQueue and How to Personalize It for Your Projects.

11 min read · [jainmohit0807.hashnode.dev](https://jainmohit0807.hashnode.dev/mastering-priorityqueue-in-java-use-cases-internals-and-custom-comparators?utm_source=hashnode&utm_medium=feed)

[Aug 8, 2025](https://hashnode.com/posts/mastering-priorityqueue-in-java-use-cases-internals-and-custom-comparators/689609d851d60c87cf531515)
