| 1 | How would you use an abstract class to implement the Template Method pattern, defining a fixed algorithm skeleton with some steps left abstract for subclasses to fill in? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 2 | Can an interface extend multiple other interfaces simultaneously, and how does this differ from a class's single-inheritance restriction for abstract/concrete classes? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 3 | How do local classes (defined within a method body) and anonymous classes differ in their capabilities and use cases, particularly regarding capturing local variables and reusability? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Advanced |
| 4 | How does the compiler implement inner classes at the bytecode level, and what synthetic elements (like a hidden outer-class reference field and synthetic accessor methods) does it generate to make this work? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Advanced |
| 5 | How would you use an anonymous class to create a one-off subclass with a customized implementation, distinct from anonymous classes implementing an interface, and what specific syntax quirk applies? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Advanced |
| 6 | What is an interface in PHP, and what purpose does it serve in defining a contract for classes to follow? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Beginner |
| 7 | How do you decide whether to use an interface or an abstract class when designing a set of related classes that share common behavior? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Intermediate |
| 8 | How does PHP's type system use interfaces to enable polymorphism, allowing different concrete classes to be used interchangeably wherever the interface type is expected? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Intermediate |
| 9 | How does the 'sealed' modifier interact with abstract classes and interface method overrides to control further extensibility? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Advanced |
| 10 | How would you implement inheritance between dataclasses, and what field-ordering rule must be respected across the hierarchy? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 11 | How does the Liskov Substitution Principle relate to properly designing interfaces and abstract classes so that subclasses can genuinely be substituted for their parent type without breaking expected behavior? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Advanced |
| 12 | What is a non-static (inner) class in Java, and how does its relationship to an enclosing instance differ from a regular top-level class? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Beginner |
| 13 | How do you instantiate a non-static inner class from OUTSIDE the enclosing class (from a different class entirely), and what is the exact syntax required? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Beginner |
| 14 | What is the fundamental difference between an interface and an abstract class in Java, and when would you choose one over the other? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Beginner |
| 15 | Can an interface declare instance fields, and if so, what implicit modifiers are automatically applied to any field declared in an interface? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Beginner |
| 16 | What is the difference between an interface and an abstract class in C#, and when should you choose one over the other? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Beginner |
| 17 | How does a local or anonymous class defined inside a static method or static context differ from one defined inside an instance method, regarding what enclosing state it can access? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Intermediate |
| 18 | Can a local class or anonymous class be generic, and how does its own type parameter interact with any generic type parameters already declared on its enclosing class or method? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Intermediate |
| 19 | How would you access the enclosing outer class's instance from within a nested inner class when there's a naming conflict (like a shadowed field with the same name), using the OuterClassName.this syntax? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Intermediate |
| 20 | How do default methods (introduced in Java 8) let an interface provide a method implementation, and what problem were they specifically introduced to solve? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 21 | What is the purpose of declaring an abstract class with a protected constructor, and how does this pattern communicate the class's intended usage to other developers? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 22 | How would you implement the 'mixin' pattern in Java using default methods on an interface, letting a class gain reusable behavior without traditional inheritance? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 23 | How would you use an abstract class's constructor to enforce that certain validation or initialization logic always runs for every subclass, something an interface (lacking constructors entirely) cannot provide? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Intermediate |
| 24 | How would you decide between using a static nested class, a non-static inner class, a local class, an anonymous class, or a lambda expression for a given design scenario, weighing their respective trade-offs? Java › Inner Classes & Anonymous Classes | Java | Inner Classes & Anonymous Classes | Advanced |
| 25 | How is the 'diamond problem' (a class implementing two interfaces with conflicting default methods) resolved in Java, and what rule determines which default method 'wins' or whether the compiler requires explicit resolution? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Advanced |
| 26 | What are private methods on an interface (introduced in Java 9), and what specific problem do they solve regarding code duplication between multiple default methods? Java › Interfaces & Abstract Classes | Java | Interfaces & Abstract Classes | Advanced |
| 27 | What is an interface, and what can (and can't) it contain in its most basic form? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Beginner |
| 28 | What is the default behavior of equals() and hashCode() inherited from Object, and why is it usually necessary to override them for value-based classes? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Beginner |
| 29 | What is the Iterator interface in PHP, and how does it relate to how a foreach loop actually works behind the scenes? PHP › Generators & Iterators | PHP | Generators & Iterators | Beginner |
| 30 | What is an abstract class in PHP, and how does it differ from a regular class and from an interface? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Beginner |
| 31 | What are the four core principles of object oriented programming, and how does PHP support each of them? PHP › OOP | PHP | OOP | Beginner |
| 32 | What are the three visibility modifiers in PHP, public, protected, and private, and how do they control access to a class's properties and methods? PHP › OOP | PHP | OOP | Beginner |
| 33 | What is a trait in PHP, and how does it let you share a set of methods across multiple unrelated classes without using traditional inheritance? PHP › Traits | PHP | Traits | Beginner |
| 34 | How do you decide between using an interface versus an abstract class for a given design? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Intermediate |
| 35 | How does explicit interface implementation work, and when would you use it instead of a normal (implicit) implementation? C# › Interfaces & Abstract Classes | C# | Interfaces & Abstract Classes | Intermediate |
| 36 | What is the Template Method pattern, and how is it used to define the skeleton of an algorithm while letting subclasses customize specific steps? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 37 | Can an interface extend another interface in PHP, and how does this let you build more specific contracts on top of a more general one? PHP › Interfaces & Abstract Classes | PHP | Interfaces & Abstract Classes | Intermediate |
| 38 | How does inheritance work in PHP using the extends keyword, and how do you call a parent class's constructor or method from within a child class? PHP › OOP | PHP | OOP | Intermediate |
| 39 | Can constexpr be used with classes and containers? C++ › Constexpr & Compile-Time | C++ | Constexpr & Compile-Time | Advanced |
| 40 | How does the getClass() versus instanceof choice in an equals() implementation affect whether subclasses can be considered equal to their superclass instances, and what's the Liskov Substitution Principle tension involved? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Advanced |
| 41 | How would you correctly implement equals() and hashCode() for a class in an inheritance hierarchy where the superclass itself defines meaningful equality-relevant fields, without breaking the contract when subclasses add their own fields? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Advanced |
| 42 | How would you design a custom exception hierarchy for an application, deciding when to create new exception classes versus reusing existing ones, and what fields/context should a well-designed custom exception carry? Java › Exceptions | Java | Exceptions | Advanced |
| 43 | How does PHP handle multiple inheritance limitations, and how do traits provide a mechanism for sharing reusable code across multiple unrelated class hierarchies? PHP › OOP | PHP | OOP | Advanced |
| 44 | What is a service container, and what problem does it solve when an application has many interdependent classes? PHP › Dependency Injection & Service Containers | PHP | Dependency Injection & Service Containers | Beginner |
| 45 | Why would a developer choose to use a trait instead of simply duplicating the same method directly into multiple different classes? PHP › Traits | PHP | Traits | Beginner |
| 46 | How do custom exception classes work in C#, and what's the recommended convention for creating one? C# › Exception Handling | C# | Exception Handling | Intermediate |
| 47 | How do trait properties and static properties behave when a trait is used by multiple different classes, and is that state actually shared between them? PHP › Traits | PHP | Traits | Intermediate |
| 48 | How does the dependency inversion principle relate to dependency injection, and how does designing around abstractions rather than concrete classes improve long term maintainability? PHP › Dependency Injection & Service Containers | PHP | Dependency Injection & Service Containers | Advanced |
| 49 | What is a const member function? C++ › Const Correctness | C++ | Const Correctness | Beginner |
| 50 | What are the four C++ named casts? C++ › Casting & Conversions | C++ | Casting & Conversions | Beginner |
| 51 | What is the difference between implicit and explicit conversions? C++ › Casting & Conversions | C++ | Casting & Conversions | Beginner |
| 52 | What do the built-in @Override, @Deprecated, and @SuppressWarnings annotations do? Java › Annotations | Java | Annotations | Beginner |
| 53 | How do you apply multiple different annotations to the same element, and does their order matter? Java › Annotations | Java | Annotations | Beginner |
| 54 | What is the Singleton pattern, and how would you implement a thread-safe Singleton in Java? Java › Design Patterns in Java | Java | Design Patterns in Java | Beginner |
| 55 | What is the Factory Method pattern's simplest form -- a basic static factory returning different subtype instances based on input -- and why might you prefer it over exposing constructors directly? Java › Design Patterns in Java | Java | Design Patterns in Java | Beginner |
| 56 | What is an enum in Java, and how does it differ from simply using a set of integer or String constants? Java › Enums | Java | Enums | Beginner |
| 57 | What is the difference between the == operator and the .equals() method when comparing two custom objects, if the class hasn't overridden equals()? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Beginner |
| 58 | How do you name a Java module, and what naming convention is recommended to avoid conflicts with other modules? Java › Java Platform Module System (JPMS) | Java | Java Platform Module System (JPMS) | Beginner |
| 59 | What is the mutable keyword? C++ › Const Correctness | C++ | Const Correctness | Intermediate |
| 60 | Why is const correctness important in API design? C++ › Const Correctness | C++ | Const Correctness | Intermediate |
| 61 | What is dynamic_cast and when do you use it? C++ › Casting & Conversions | C++ | Casting & Conversions | Intermediate |
| 62 | What is the explicit keyword and why use it? C++ › Casting & Conversions | C++ | Casting & Conversions | Intermediate |
| 63 | What are Java's meta-annotations (@Retention, @Target, @Documented, @Inherited), and what does each control? Java › Annotations | Java | Annotations | Intermediate |
| 64 | How does the Builder pattern solve the "telescoping constructor" problem, and how would you implement it for a class with many optional parameters? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 65 | What is the Factory Method pattern, and how does it differ from the simpler Static Factory Method idiom (like List.of() or Optional.of())? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 66 | What is the Adapter pattern, and when would you use it to make an existing class compatible with an interface it wasn't originally designed to implement? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 67 | What is the difference between composition and inheritance as ways to reuse code, and why does the design principle "favor composition over inheritance" generally guide modern Java design (including many design patterns themselves)? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 68 | How would you implement the Composite pattern to treat individual objects and groups of objects uniformly, such as a file system with files and directories? Java › Design Patterns in Java | Java | Design Patterns in Java | Intermediate |
| 69 | How do you add fields, constructors, and methods to a Java enum, and how would you implement an enum representing planets with mass and radius that calculates surface gravity? Java › Enums | Java | Enums | Intermediate |
| 70 | Why is it particularly important for a class's equals() and hashCode() to be based on effectively immutable data specifically when that class is used as a JPA/Hibernate entity, and what special considerations apply to entity identity before it's persisted (has a generated ID)? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Intermediate |
| 71 | How do you create and throw a custom exception class, and what constructors should a well-designed custom exception typically provide? Java › Exceptions | Java | Exceptions | Intermediate |
| 72 | What are the four kinds of method references in Java (static, instance-bound, instance-unbound, and constructor), and how does the compiler determine which form applies? Java › Functional Interfaces & Method References | Java | Functional Interfaces & Method References | Intermediate |
| 73 | What is an unbounded wildcard (List<?>), and when is it more appropriate to use than a bounded generic method with a type parameter <T>? Java › Generics | Java | Generics | Intermediate |
| 74 | How does Java's operator precedence and associativity determine the evaluation order of a complex expression, and what are some common precedence-related mistakes? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Intermediate |
| 75 | What is the difference between a Java text block (introduced as a standard feature in Java 15) and a traditional String literal, and what specific syntax rules govern indentation handling? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Intermediate |
| 76 | What is the difference between the ++ (increment) and -- (decrement) operators used in prefix versus postfix position, and what subtle bug can arise from using them within a complex expression? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Intermediate |
| 77 | How does Java's short-circuit evaluation for && and || operators differ from the non-short-circuiting & and | operators when applied to boolean operands, and why does this distinction matter for avoiding NullPointerException? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Intermediate |
| 78 | What is the difference between an instance initializer block and a static initializer block, and when does each execute relative to a class's constructors? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Intermediate |
| 79 | How do the requires and exports directives in a module-info.java file work together to define a module's dependencies and public API surface? Java › Java Platform Module System (JPMS) | Java | Java Platform Module System (JPMS) | Intermediate |
| 80 | What is a qualified export (exports package to specificModule), and when would you use it instead of a plain, unqualified export? Java › Java Platform Module System (JPMS) | Java | Java Platform Module System (JPMS) | Intermediate |
| 81 | What is the Module pattern in Node.js, and how does it enable encapsulation? Node.js › Architecture & Design Patterns | Node.js | Architecture & Design Patterns | Intermediate |
| 82 | What is the IteratorAggregate interface, and how does it provide a simpler alternative to implementing the full Iterator interface directly? PHP › Generators & Iterators | PHP | Generators & Iterators | Intermediate |
| 83 | Can a trait define abstract methods, and how does this let a trait enforce that any class using it must provide its own specific implementation of certain behavior? PHP › Traits | PHP | Traits | Intermediate |
| 84 | What is the difference between shallow copy and deep copy in memory terms? C++ › Memory Management | C++ | Memory Management | Advanced |
| 85 | What is memory alignment and why does it matter? C++ › Memory Management | C++ | Memory Management | Advanced |
| 86 | How are lambdas implemented under the hood? C++ › Lambda Expressions | C++ | Lambda Expressions | Advanced |
| 87 | What is the difference between physical and logical constness? C++ › Const Correctness | C++ | Const Correctness | Advanced |
| 88 | How do you overload a member function on const? C++ › Const Correctness | C++ | Const Correctness | Advanced |
| 89 | What is the difference between static_cast and dynamic_cast for downcasting? C++ › Casting & Conversions | C++ | Casting & Conversions | Advanced |
| 90 | How do repeatable annotations work in Java (using @Repeatable), and what problem do they solve? Java › Annotations | Java | Annotations | Advanced |
| 91 | How would you implement the Decorator pattern in Java, and how does java.io's InputStream/OutputStream class hierarchy exemplify this pattern in the JDK itself? Java › Design Patterns in Java | Java | Design Patterns in Java | Advanced |
| 92 | How would you implement equals()/hashCode() correctly for a class containing a mutable field, and why does using such a class as a HashMap key or HashSet element create a serious risk? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Advanced |
| 93 | How does Java's type inference determine the target type for a lambda expression in an ambiguous overload scenario, and what happens when a lambda could match multiple overloaded methods accepting different functional interfaces? Java › Functional Interfaces & Method References | Java | Functional Interfaces & Method References | Advanced |
| 94 | How do bounded wildcards (? extends T and ? super T) work, and what does the PECS (Producer Extends, Consumer Super) mnemonic mean for choosing between them? Java › Generics | Java | Generics | Advanced |
| 95 | How does generic method overload resolution interact with type erasure to sometimes produce a compile error for seemingly valid overloads (like two methods differing only by their generic type parameter)? Java › Generics | Java | Generics | Advanced |
| 96 | How would you implement a generic builder pattern with a self-referential generic type parameter (the 'curiously recurring generic pattern', <T extends Builder<T>>) to support fluent method chaining that correctly returns the actual subclass type in an inheritance hierarchy? Java › Generics | Java | Generics | Advanced |
| 97 | What is Domain-Driven Design (DDD), and how do its concepts of entities, value objects, and aggregates apply to a Node.js codebase? Node.js › Architecture & Design Patterns | Node.js | Architecture & Design Patterns | Advanced |
| 98 | How does PHP's type variance, specifically covariance and contravariance, affect how return types and parameter types can be safely changed when overriding a method in a child class? PHP › Type Declarations & Strict Types | PHP | Type Declarations & Strict Types | Advanced |