Skip to content
SparkTime, home

Tagged #OOP

GuideCareer

12 min read

Machine Coding and Low-Level Design for Freshers

Many product companies include a round where you design and build a small working system in 60 to 120 minutes: a parking lot, a cab booking service, a library system. Most freshers have never practised it. This article explains what these rounds evaluate, a time-boxed approach from requirements to running code, design principles that matter at this level, a complete small example, typical follow-up questions, and how to practise with AI as a demanding interviewer.

GuideTechnology

12 min read

Enums, Records and Sealed Types

How to model data precisely in modern Java: enums for fixed sets of values, records for immutable data carriers, and sealed types with pattern matching for a closed set of alternatives. Each is introduced from the bug it prevents, and compared with the older style you will still see.

GuideTechnology

12 min read

equals, hashCode, toString and the Object Contract

Why two objects that look identical are not equal by default, what == really compares, how to write equals and hashCode correctly, why mutable keys break HashSet and HashMap, and how immutability makes all of this safer. Includes the Integer cache surprise and the contracts interviewers ask about.

GuideTechnology

13 min read

Interfaces, Polymorphism and Composition

Starting from a payment system full of if-else branches, this article shows why interfaces and polymorphism exist, how abstract classes differ from interfaces, what default methods are for, and why composition usually beats inheritance. It also previews the idea behind dependency injection.

GuideTechnology

11 min read

Inheritance, Overriding and Overloading

How one Java class can build on another, how overriding changes behaviour at runtime, how overloading is chosen at compile time, and why inheritance is easy to misuse. With the constructor-order trap, field hiding and the exact differences interviewers ask about.

GuideTechnology

12 min read

Classes, Objects and Encapsulation

Why object-oriented programming exists and how Java expresses it: classes as blueprints, objects as instances, constructors, access modifiers, static versus instance members, and encapsulation as a way to protect the rules of your data. Built around a bank account that cannot go wrong.