ReviseAlgo Logo

Object-Oriented Programming

13 Topics
1

Classes and Objects

Analyze class blueprint specifications, heap allocations, and reference stack pointer controls.

Focuses on stack vs heap memory allocations, object lifecycles, and class blueprints vs runtime object layouts.
2

Constructors

Analyze default vs parameterized constructors, constructor chaining via this and super, and initialization block execution sequences.

Evaluates constructor chaining order, default constructor insertion mechanics, and static/instance initialization block execution order.
3

this Keyword

Analyze the usage of the this reference keyword to resolve field shadowing, chain constructors, and pass contexts.

Evaluates difference between this references and super contexts, static constraints, and shadow resolutions.
4

Access Modifiers

Deconstruct Java's four visibility levels (public, protected, package-private, private) and encapsulation rules.

Tests accessibility scopes, subclass vs package visibility, overriding rules (cannot reduce visibility), and encapsulation safety.
5

static Keyword

Analyze class-level static variables and methods, static block initialization, and memory locations.

Focuses on static initialization execution orders, static field heap allocations, and namespace constraints.
6

final Keyword

Analyze final variables (primitives vs references), final class inheritance blocks, and compile-time constant folding optimizations.

Focuses on blank final variable initializations, final reference mutations, constant folding rules, and final classes.
7

Instance vs Static

Contrast heap instance variable allocations with Metaspace static metadata declarations and thread safety.

Focuses on static vs dynamic memory locations, thread safety differences, and access boundary behaviors.
8

Nested Classes

Contrast Static Nested classes with non-static Inner classes, tracking enclosing instance reference leaks.

Focuses on static nested vs inner classes, outer class instance references, enclosing references, and memory leaks.
9

Anonymous Classes

Analyze local subclassing on the fly, closure variables capture rules, and effectively final constraints.

Focuses on anonymous inner class capture rules, final/effectively final limits, and class file generation.
10

Object Class

Analyze the root of the Java class hierarchy, object clone mechanics, and the deprecation of finalize.

Focuses on parent root method contracts, clone shallow copy constraints, and finalize garbage collection risks.
11

equals() and hashCode()

Deconstruct the equivalence contract (reflexive, symmetric, transitive), hash collision costs, and HashMap bucket resolutions.

Focuses on equals/hashCode contract invariants, hash collision degradation, and correct contract overrides.
12

toString() Method

Analyze default hexadecimal string formats, string concatenation triggers, and debugging print requirements.

Focuses on default Object format (ClassName@hash), performance logging patterns, and auto concatenation rules.
13

Immutable Classes

Analyze the recipe for immutability: final classes, final private fields, and defensive copying.

Focuses on design constraints for immutability, defensive copies, and thread safety benefits.