W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
8 questions for “Logging in Java (java.util.logging”
Found in 1 field. Select a question to see its full answer.
Matching topics
Java
equals(), hashCode() & toStr
in
g() Contracts
1
Java
Java
Date & Time API (
java
.time)
1
Information Technology
8 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is the purpose of overrid
in
g toStr
in
g(), and what's the difference between Object's default implementation and a well-designed custom one?
Java › equals(), hashCode() & toString() Contracts
Java
equals(), hashCode() & toStr
in
g() Contracts
Intermediate
2
How does the
In
stant class represent a po
in
t
in
time, and how does it differ fundamentally from ZonedDateTime
in
terms of what it actually represents and how it should be used?
Java › Java Date & Time API (java.time)
Java
Java
Date & Time API (
java
.time)
Advanced
3
How would you design and implement a global, centralized exception-handl
in
g strategy for a
Java
application (such as a top-level handler
in
ma
in
(), or an uncaught exception handler for background threads), ensur
in
g no exception silently crashes the application without be
in
g logged?
Java › Exceptions
Java
Exceptions
Advanced
4
What is a common anti-pattern with catch
in
g exceptions too broadly (catch (Exception e) or worse, catch (Throwable t)), and why is it generally discouraged?
Java › Exceptions
Java
Exceptions
Intermediate
5
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
6
What is the purpose of the Pr
in
tStream and Pr
in
tWriter classes (like System.out), and how do they differ from lower-level OutputStream/Writer
in
their exception-handl
in
g behavior?
Java › I/O & NIO
Java
I/O & NIO
Intermediate
7
How does exception cha
in
in
g (via the cause mechanism,
in
itCause() or a constructor accept
in
g a Throwable) preserve the orig
in
al root-cause exception when wrapp
in
g and rethrow
in
g a different exception type, and why does this matter for debugg
in
g?
Java › Exceptions
Java
Exceptions
Advanced
8
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 los
in
g
in
formation at each layer?
Java › Exceptions
Java
Exceptions
Advanced