Nihar coaching classes

Call Directions

Nihar coaching classes To teach is to learn twice😇

23/09/2026

Why did orElse() run even though the value already exists?

This Java 8 interview trap explains the difference between orElse() and orElseGet().

orElse() evaluates its argument even when the Optional already contains a value.

orElseGet() uses a Supplier and evaluates it only when the Optional is empty.

In this Day 64 Java Placement Challenge, see this confusing Java Optional behavior through a visual interview example.

Learn Java Optional, orElse(), orElseGet(), eager evaluation, lazy evaluation, Java 8 features and Java interview questions.

Would you catch this in a Java interview?

21/09/2026

What happens when two Java interfaces have the same default method? 😳

This Java interview trap shows what happens when a class implements two interfaces that both provide the same default method.

Java cannot choose between the two implementations, so the implementing class must override the method and resolve the conflict.

Learn Java default methods, interfaces, multiple inheritance, default method conflict, method overriding and Java interview questions through this visual Java Placement Challenge.
Would you catch this Java interview trap? 👀

Day 63/100 — Java Placement Challenge

CodingInterview JavaPlacement

18/09/2026

This java stream code does nothing?
This Java Stream code looks like it should run… but it DOES NOTHING! 😳

The trick? filter() and map() are intermediate operations, so the Stream pipeline is lazy until a terminal operation triggers ex*****on.

A quick Java 8 interview trap covering Stream API, lazy evaluation, intermediate operations and terminal operations.

Could you catch this in a Java interview? 👀
JavaPlacement Shorts

17/09/2026

This Java Stream code looks like it should run… but it DOES NOTHING! 😳

The trick? filter() and map() are intermediate operations, so the Stream pipeline is lazy until a terminal operation triggers ex*****on.

A quick Java 8 interview trap covering Stream API, lazy evaluation, intermediate operations and terminal operations.

Could you catch this in a Java interview? 👀
JavaPlacement Shorts

16/09/2026

Where does a Java class go when you run your program?

In Day 60 of the Java Placement Challenge, discover the difference between Class Metadata, Metaspace and Heap Memory.

When you write new Demo(), the object goes to the Heap — but class metadata is associated with Metaspace in HotSpot JVM.

A simple visual explanation designed for Java interviews, placement preparation and Java developers.
JavaPlacement JVM Shortsniharacademy2024

14/09/2026

Why java garbage collection can’t save you?| out of memory error explained |
Java has Garbage Collection… so why can memory still keep filling up?

See how a growing static collection keeps objects reachable, preventing Garbage Collection from reclaiming them. When the Heap fills up, Java can throw an OutOfMemoryError.

A visual Java interview concept covering Java Garbage Collection, Memory Leak, Heap Memory, static references and OutOfMemoryError.

13/09/2026

Java heap v/s stack memory explained| where is the object stored??

Where is an object stored in Java?
Learn how Java Heap and Stack Memory work when an object is created using new. See why the reference variable d is in the stack while the actual object lives in the heap.

A visual explanation of Java object creation, reference variables, Heap vs Stack memory and Java interview concepts.

JavaMemory JavaPlacement

12/09/2026

Java stackoverflow error explained:why does test() calling itself?

Why does this Java method keep calling itself until the program crashes?

In this Day 57 Java Placement Challenge, watch how recursion without a base case keeps creating new stack frames until the Java stack limit is reached, causing a StackOverflowError.

Learn Java recursion, Stack Memory, Stack Frames and StackOverflowError through a visual Java interview concept.

Perfect for Java interviews, placement preparation, Java developers, BTech/BE students and programming interview preparation.

Follow for the next Java interview challenge!

11/09/2026

Java string pool v/s new string () v/s intern ()

Can you solve this?do comment below before answer is revealed!

10/09/2026

What does the intern()method actually do in java??

This java string pool interview question tests your understanding of string interning,object references,new string ()and intern ()method.

Address

Port Porbandar

Telephone

9427932051

Website

Alerts

Be the first to know and let us send you an email when Nihar coaching classes posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share

Category