| 1 | What is 'reverse mapping' in numeric enums, and why don't string enums support it? TypeScript › Enums | TypeScript | Enums | Intermediate |
| 2 | How does the EnumSet and EnumMap provide more efficient alternatives to HashSet<Enum> and HashMap<Enum, V> specifically for enum keys? Java › Enums | Java | Enums | Intermediate |
| 3 | How does TypeScript's structural type checking treat two DIFFERENT numeric enums that happen to have the same underlying values? TypeScript › Enums | TypeScript | Enums | Advanced |
| 4 | How does Java implement enums under the hood at the bytecode level (extending java.lang.Enum), and what makes them inherently thread-safe and serialization-safe as singletons? Java › Enums | Java | Enums | Advanced |
| 5 | What are enums introduced in PHP 8.1, and how do backed enums differ from pure enums in terms of the values they can represent? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Intermediate |
| 6 | How do you safely validate that an enum value received from external input (like deserialized JSON or a database) is actually a DEFINED member, given that enums don't enforce this by default? C# › Enums & Flags | C# | Enums & Flags | Advanced |
| 7 | How do enums interact with generic constraints, and why has it historically been awkward to write generic, reusable flag-manipulation code? C# › Enums & Flags | C# | Enums & Flags | Advanced |
| 8 | How can PHP 8's readonly properties, enums, and first class callable syntax be combined together to build more robust, immutable, and expressive domain models compared to earlier PHP versions? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Advanced |
| 9 | How do enums, introduced in PHP 8.1, provide a more type safe alternative to using class constants for representing a fixed set of related values? PHP › Constants & Superglobals | PHP | Constants & Superglobals | Advanced |
| 10 | What are PHP 8's enums, and how do they provide a more type safe alternative to using plain class constants for representing a fixed set of related values? PHP › Type Declarations & Strict Types | PHP | Type Declarations & Strict Types | Advanced |
| 11 | What is a numeric enum, and what values do its members get by default? TypeScript › Enums | TypeScript | Enums | Beginner |
| 12 | What is a string enum, and how does it differ from a numeric enum? TypeScript › Enums | TypeScript | Enums | Beginner |
| 13 | 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 |
| 14 | How do you retrieve all constants of an enum type, and how would you iterate over them? Java › Enums | Java | Enums | Beginner |
| 15 | What is a 'const enum' and how does it differ from a regular enum in the compiled output? TypeScript › Enums | TypeScript | Enums | Intermediate |
| 16 | How do computed and constant enum members work when mixing string and numeric-style initialization? TypeScript › Enums | TypeScript | Enums | Intermediate |
| 17 | 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 |
| 18 | How would you implement an enum that also implements an interface, and what's the benefit of having different enum constants provide different behavior through a shared interface contract? Java › Enums | Java | Enums | Intermediate |
| 19 | What are the ordinal() and name() methods on an enum constant, and why is relying on ordinal() for persistence or serialization considered dangerous? Java › Enums | Java | Enums | Intermediate |
| 20 | How do you correctly use an enum as a switch statement/expression's target, and what changed with the introduction of arrow-style switch expressions (Java 14+) regarding exhaustiveness and fall-through? Java › Enums | Java | Enums | Intermediate |
| 21 | What is the valueOf() method on an enum, and what happens when you pass a name that doesn't match any declared constant? Java › Enums | Java | Enums | Intermediate |
| 22 | How would you use an enum to represent a fixed set of configuration keys combined with a shared lookup method, avoiding scattered String literal keys throughout a codebase? Java › Enums | Java | Enums | Intermediate |
| 23 | Why do many style guides recommend using a union of string literal types instead of an enum in modern TypeScript? TypeScript › Enums | TypeScript | Enums | Advanced |
| 24 | How do you create a type-safe iteration over all values of a string enum? TypeScript › Enums | TypeScript | Enums | Advanced |
| 25 | What is an 'ambient enum' declared with 'declare enum', and when would you use one? TypeScript › Enums | TypeScript | Enums | Advanced |
| 26 | How would you model a set of flags/permissions using a numeric enum with bitwise values, and how do you check if a flag is set? TypeScript › Enums | TypeScript | Enums | Advanced |
| 27 | How would you implement the Strategy pattern using an enum with constant-specific method bodies, and how does this compare to a traditional interface-based Strategy implementation? Java › Enums | Java | Enums | Advanced |
| 28 | How would you use an EnumMap combined with a switch expression to implement a state machine, and what compile-time safety benefits does an exhaustive switch over an enum provide? Java › Enums | Java | Enums | Advanced |
| 29 | How would you implement a custom enum that also functions as a lookup table (mapping an external code to a constant), such as parsing an HTTP status code string into an enum constant, handling unknown values gracefully? Java › Enums | Java | Enums | Advanced |
| 30 | How would you implement a custom compareTo()-based ordering for an enum that differs from its natural declaration-order ordering, given Comparable's default implementation uses ordinal()? Java › Enums | Java | Enums | Advanced |
| 31 | How would you handle adding behavior to an enum where the number of constants might grow very large or needs to be data-driven rather than hardcoded at compile time, and why might a class-based registry be more appropriate in that scenario? Java › Enums | Java | Enums | Advanced |
| 32 | What is an enumeration (enum) in C++? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Beginner |
| 33 | What is an enum class (scoped enum) and why is it preferred? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Beginner |
| 34 | How do you assign specific values to enumerators? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Beginner |
| 35 | What is the difference between an enum and a set of #define constants? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Beginner |
| 36 | How do you specify the underlying type of an enum? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Intermediate |
| 37 | How do you convert between an enum class and its underlying integer? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Intermediate |
| 38 | Can you forward declare an enum, and what are the rules? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Intermediate |
| 39 | What are the scoping and name-collision advantages of enum class? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Intermediate |
| 40 | How do you implement type-safe bit flags with enum class? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Advanced |
| 41 | How can you convert an enum to a string (reflection limitations)? C++ › Enums & Enum Classes | C++ | Enums & Enum Classes | Advanced |
| 42 | How do you declare an enum in C#, and what underlying type do its members have by default? C# › Enums & Flags | C# | Enums & Flags | Beginner |
| 43 | How do you convert between an enum value and its underlying numeric value, and between an enum and its string name? C# › Enums & Flags | C# | Enums & Flags | Beginner |
| 44 | What is the match expression introduced in PHP 8, and how does it improve upon the traditional switch statement? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Beginner |
| 45 | What is the nullsafe operator introduced in PHP 8, and how does it simplify safely accessing a chain of potentially null properties or methods? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Beginner |
| 46 | How do you create a 'flags' enum that supports combining multiple values using bitwise operations? C# › Enums & Flags | C# | Enums & Flags | Intermediate |
| 47 | How does the [Flags] attribute change the output of ToString() on a combined flags enum value? C# › Enums & Flags | C# | Enums & Flags | Intermediate |
| 48 | What is the performance consideration when using Enum.HasFlag() versus a direct bitwise AND check? C# › Enums & Flags | C# | Enums & Flags | Intermediate |
| 49 | What are PHP attributes introduced in PHP 8, and how do they provide a structured, native alternative to the older convention of using docblock comments for metadata? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Intermediate |
| 50 | How do constructor property promotion, introduced in PHP 8, reduce boilerplate code when defining a class with several properties initialized directly through its constructor? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Intermediate |
| 51 | How would you write an extension method to safely add or remove a specific flag from a [Flags] enum value without manual bitwise operators scattered throughout your code? C# › Enums & Flags | C# | Enums & Flags | Advanced |
| 52 | How would you use pattern matching (switch expressions) with an enum, including exhaustiveness warnings from the compiler? C# › Enums & Flags | C# | Enums & Flags | Advanced |
| 53 | How would you design an enum-based state machine using pattern matching to enforce valid state transitions at compile time or runtime? C# › Enums & Flags | C# | Enums & Flags | Advanced |
| 54 | How do union types and intersection types in PHP 8 provide more expressive and precise type declarations than were previously possible? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Advanced |
| 55 | How do you merge a namespace with an enum to add extra static-like helper functionality to that enum? TypeScript › Namespaces & Declaration Merging | TypeScript | Namespaces & Declaration Merging | Intermediate |
| 56 | What is array destructuring in PHP, and how does the list function or short array syntax simplify extracting values from an array? PHP › Arrays in PHP | PHP | Arrays in PHP | Intermediate |
| 57 | What are arrow functions introduced in PHP 7.4, and how do they simplify writing short closures compared to traditional anonymous functions? PHP › Closures & Anonymous Functions | PHP | Closures & Anonymous Functions | Intermediate |
| 58 | What is the difference between class constants and global constants, and how do you define and access a constant within a class? PHP › Constants & Superglobals | PHP | Constants & Superglobals | Intermediate |
| 59 | How does the Factory pattern help decouple object creation logic from the code that actually uses those objects? PHP › Design Patterns in PHP | PHP | Design Patterns in PHP | Intermediate |
| 60 | What are named arguments introduced in PHP 8, and how do they improve the readability of function calls with many parameters? PHP › Functions & Scope | PHP | Functions & Scope | Intermediate |
| 61 | How does the readonly property modifier introduced in PHP 8.1 help enforce immutability for specific class properties? PHP › OOP | PHP | OOP | Intermediate |
| 62 | How do first class callable syntax and higher order functions in modern PHP support building flexible, composable, functional style code? PHP › Closures & Anonymous Functions | PHP | Closures & Anonymous Functions | Advanced |
| 63 | How do function type declarations and return type declarations improve code reliability, and how does PHP handle nullable and union types in function signatures? PHP › Functions & Scope | PHP | Functions & Scope | Advanced |