| 1 | What is the difference between checked and unchecked exceptions in Java, and how does the compiler treat each differently? Java › Exceptions | Java | Exceptions | Beginner |
| 2 | What is a common anti-pattern with catching exceptions too broadly (catch (Exception e) or worse, catch (Throwable t)), and why is it generally discouraged? Java › Exceptions | Java | Exceptions | Intermediate |
| 3 | What is the purpose of the addSuppressed() mechanism and getSuppressed() method on Throwable, and in what specific scenario does the JVM automatically populate suppressed exceptions? Java › Exceptions | Java | Exceptions | Intermediate |
| 4 | How would you convert a checked-exception-throwing method into a lambda usable with a standard functional interface (which doesn't declare any checked exceptions), given standard interfaces like Function don't permit checked exceptions in their abstract method signature? Java › Functional Interfaces & Method References | Java | Functional Interfaces & Method References | Intermediate |
| 5 | How should exceptions be handled inside a BackgroundService's ExecuteAsync loop to prevent the entire service from crashing silently? .NET › Background Services | .NET | Background Services | Intermediate |
| 6 | How do you handle exceptions specifically within minimal API endpoints, given they don't use the traditional MVC exception filter pipeline? .NET › Global Exception Handling & Middleware | .NET | Global Exception Handling & Middleware | Intermediate |
| 7 | What is the difference between handling exceptions with middleware versus using try/catch blocks directly in controller actions? .NET › Global Exception Handling & Middleware | .NET | Global Exception Handling & Middleware | Intermediate |
| 8 | How should a global exception handler differentiate between exceptions that should return specific client-facing details versus exceptions that should always show a generic message? .NET › Global Exception Handling & Middleware | .NET | Global Exception Handling & Middleware | Intermediate |
| 9 | How should exceptions be handled inside a BackgroundService's work loop to prevent one failure from silently stopping all future processing? ASP.NET Core › Background Tasks & Hosted Services | ASP.NET Core | Background Tasks & Hosted Services | Intermediate |
| 10 | How do you handle exceptions specifically within minimal API endpoints, given they don't use the traditional MVC exception filter pipeline? ASP.NET Core › Error Handling | ASP.NET Core | Error Handling | Intermediate |
| 11 | How should a global exception handler differentiate between exceptions meant for client-facing details versus exceptions that should always show a generic message? ASP.NET Core › Error Handling | ASP.NET Core | Error Handling | Intermediate |
| 12 | How do you configure PDO's error handling mode to ensure database errors are properly reported as catchable exceptions rather than silently failing? PHP › PDO & Databases | PHP | PDO & Databases | Intermediate |
| 13 | When should you create custom exceptions vs use built-in ones? C# › Exception Handling | C# | Exception Handling | Advanced |
| 14 | What is the recommended strategy for exceptions in a layered/enterprise app? C# › Exception Handling | C# | Exception Handling | Advanced |
| 15 | How do you write a generic Result<T, E> discriminated union type for functional-style error handling, and why is it preferred over throwing exceptions in some codebases? TypeScript › Discriminated Unions & Exhaustiveness Checking | TypeScript | Discriminated Unions & Exhaustiveness Checking | Advanced |
| 16 | How does exception handling interact with async/await, and how are exceptions from an async Task propagated to the awaiting caller? C# › Exception Handling | C# | Exception Handling | Advanced |
| 17 | How does AggregateException work with Task.WhenAll() when multiple concurrent tasks throw exceptions? C# › Exception Handling | C# | Exception Handling | Advanced |
| 18 | How would you design a robust global exception handling middleware in ASP.NET Core to convert unhandled exceptions into consistent API error responses? C# › Exception Handling | C# | Exception Handling | Advanced |
| 19 | How does exception performance (throwing/catching) compare to normal control flow, and why should exceptions generally NOT be used for expected, routine control flow? C# › Exception Handling | C# | Exception Handling | Advanced |
| 20 | How does the C# 'nameof' operator work, and why is it preferred over hardcoding a string literal for things like argument names in exceptions? C# › Fundamentals | C# | Fundamentals | Advanced |
| 21 | How does Python 3.11's exception groups (ExceptionGroup) and the 'except*' syntax let you handle MULTIPLE unrelated exceptions raised together? Python › Exception Handling | Python | Exception Handling | Advanced |
| 22 | How would you implement a retry-with-backoff decorator that catches specific transient exceptions and retries with increasing delays? Python › Exception Handling | Python | Exception Handling | Advanced |
| 23 | How does exception performance (raising/catching) compare to normal control flow, and why does Python's EAFP style still encourage using exceptions for routine control flow, unlike some other languages? Python › Exception Handling | Python | Exception Handling | Advanced |
| 24 | How does the CLR handle exceptions at a low level, and what is the performance implication of throwing exceptions frequently? .NET › CLR & Runtime | .NET | CLR & Runtime | Advanced |
| 25 | How would you implement custom middleware to catch and log unhandled exceptions before they reach the exception handler, adding request-specific context? .NET › Global Exception Handling & Middleware | .NET | Global Exception Handling & Middleware | Advanced |
| 26 | How do you handle exceptions that occur during response streaming, after the response has already partially started sending to the client? .NET › Global Exception Handling & Middleware | .NET | Global Exception Handling & Middleware | Advanced |
| 27 | How do you handle exceptions that occur during response streaming, after the response has already partially started sending to the client? ASP.NET Core › Error Handling | ASP.NET Core | Error Handling | Advanced |
| 28 | How do you set a global exception handler and error handler in PHP to consistently catch and log any uncaught exceptions or errors across an entire application? PHP › Error & Exception Handling | PHP | Error & Exception Handling | Advanced |
| 29 | What best practices should guide how an application logs, reports, and responds to exceptions differently across development and production environments? PHP › Error & Exception Handling | PHP | Error & Exception Handling | Advanced |
| 30 | What is the basic syntax and control flow of a try-catch-finally block, and what determines which catch block (if multiple exist) handles a thrown exception? Java › Exceptions | Java | Exceptions | Beginner |
| 31 | What is the correct usage of try-with-resources, and how does it automatically ensure a resource's close() method is called even if an exception occurs? Java › Exceptions | Java | Exceptions | Intermediate |
| 32 | What is the finally block's execution guarantee, and what are the specific edge cases where a finally block might NOT execute? Java › Exceptions | Java | Exceptions | Intermediate |
| 33 | What is the multi-catch syntax (catch (IOException | SQLException e)) introduced in Java 7, and what restriction applies to the exception types combined in a single multi-catch block? Java › Exceptions | Java | Exceptions | Intermediate |
| 34 | What is the difference between Error and Exception in Java's Throwable hierarchy, and why should application code generally avoid catching Error subclasses like OutOfMemoryError or StackOverflowError? Java › Exceptions | Java | Exceptions | Intermediate |
| 35 | 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 |
| 36 | How does exception chaining (via the cause mechanism, initCause() or a constructor accepting a Throwable) preserve the original root-cause exception when wrapping and rethrowing a different exception type, and why does this matter for debugging? Java › Exceptions | Java | Exceptions | Advanced |
| 37 | 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 |
| 38 | How does exception handling interact with performance, particularly regarding the cost of filling in a stack trace, and how would you optimize exception usage in a performance-critical hot path? Java › Exceptions | Java | Exceptions | Advanced |
| 39 | How would you implement a custom checked exception that requires additional context to be attached as the exception propagates up multiple layers of a call stack, without losing information at each layer? Java › Exceptions | Java | Exceptions | Advanced |
| 40 | How does exception handling interact with generics and type erasure, specifically regarding why you cannot catch a generic type parameter as an exception type (catch (T e))? Java › Exceptions | Java | Exceptions | Advanced |
| 41 | How would you design and implement a global, centralized exception-handling strategy for a Java application (such as a top-level handler in main(), or an uncaught exception handler for background threads), ensuring no exception silently crashes the application without being logged? Java › Exceptions | Java | Exceptions | Advanced |
| 42 | How do you apply multiple different annotations to the same element, and does their order matter? Java › Annotations | Java | Annotations | Beginner |
| 43 | How do you declare and initialize an array of objects (reference types) versus an array of primitives, and what is the key difference in their default values? Java › Arrays & Multidimensional Arrays | Java | Arrays & Multidimensional Arrays | Beginner |
| 44 | What is the difference between the @Nullable/@NonNull annotations (from libraries like JetBrains or JSR-305) and Java's built-in Optional type for expressing nullability? Java › Annotations | Java | Annotations | Intermediate |
| 45 | How does Java handle array bounds checking, and what exception is thrown when accessing an invalid index? Java › Arrays & Multidimensional Arrays | Java | Arrays & Multidimensional Arrays | Intermediate |
| 46 | What causes a ClassNotFoundException versus a NoClassDefFoundError, and how do you distinguish and diagnose each? Java › Class Loading & Bytecode Verification | Java | Class Loading & Bytecode Verification | Intermediate |
| 47 | What is the difference between fail-fast and fail-safe iterators in the Collections Framework, and which collections use each? Java › Collections Framework | Java | Collections Framework | Intermediate |
| 48 | What is a race condition, and how does it differ conceptually from a deadlock as two distinct categories of concurrency bugs? Java › Concurrency & Threads | Java | Concurrency & Threads | Intermediate |
| 49 | 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 |
| 50 | How does Objects.equals() and Objects.hash() from java.util.Objects simplify writing correct equals() and hashCode() implementations, particularly regarding null-safety? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Intermediate |
| 51 | What is the purpose of overriding toString(), and what's the difference between Object's default implementation and a well-designed custom one? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Intermediate |
| 52 | How would you write a unit test that thoroughly verifies a custom equals() and hashCode() implementation satisfies its contract, and what testing libraries exist specifically for this purpose? Java › equals(), hashCode() & toString() Contracts | Java | equals(), hashCode() & toString() Contracts | Intermediate |
| 53 | What is the purpose of the PrintStream and PrintWriter classes (like System.out), and how do they differ from lower-level OutputStream/Writer in their exception-handling behavior? Java › I/O & NIO | Java | I/O & NIO | Intermediate |
| 54 | 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 |
| 55 | 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 |
| 56 | 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 |
| 57 | How would you implement annotation-based validation (similar to Bean Validation's @NotNull, @Size) using a custom annotation and a reflection-based validator? Java › Annotations | Java | Annotations | Advanced |
| 58 | How does Java implement covariant array typing, and why is this considered a design flaw that can lead to runtime ArrayStoreException? Java › Arrays & Multidimensional Arrays | Java | Arrays & Multidimensional Arrays | Advanced |
| 59 | How does the Collections Framework's fail-fast modCount mechanism actually work internally, and why is it described as "best-effort" rather than a strict guarantee? Java › Collections Framework | Java | Collections Framework | Advanced |
| 60 | 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 |
| 61 | How does Java's implicit numeric type promotion and narrowing/widening conversion rules work, and what specific data-loss or precision risks does an implicit narrowing conversion (requiring an explicit cast) guard against? Java › Java Fundamentals: Syntax, Data Types & Operators | Java | Java Fundamentals: Syntax, Data Types & Operators | Advanced |