Questions
Java questions
Choose a question page, learn the concept, then test your understanding with a quiz.
What Is Reflection in Java and Why Is It Useful?
Learn what reflection is in Java, how it works, why it is useful, and when to avoid it with practical examples for beginners.
What Is a JavaBean in Java? Properties, Getters/Setters, and Serializable Explained
Learn what a JavaBean is in Java, how it differs from a regular class, why the term exists, and what Serializable means.
What Is a Maven SNAPSHOT and Why Is It Used?
Learn what a Maven SNAPSHOT is, how it differs from a release, and why Java teams use it during active development.
What Is a Static Class in Java? Understanding Static Nested Classes
Learn what a static class means in Java, where it is allowed, how it differs from inner classes, and when to use static methods and utility classes.
What `synchronized` Means in Java: Thread Safety Explained
Learn what `synchronized` means in Java, when to use it, how it works, and how it protects shared data in multithreaded code.
When to Use LinkedList vs ArrayList in Java
Learn when to use LinkedList or ArrayList in Java, how they differ in performance, and which List implementation fits common coding tasks.
When to Use Static Methods in Java
Learn when to use static methods in Java, how they differ from instance methods, and when to call methods on a class vs an object.
Why Eclipse Says “Must Override a Superclass Method” in Java Android Projects
Learn why Eclipse shows “must override a superclass method” in Java Android projects after re-importing, and how to fix it correctly.
Why Java Compound Assignment Operators Like += Don’t Require Casting
Learn why Java compound assignment operators like += compile without explicit casts, and how they differ from normal assignment.
Why Java Has transient Fields: Serialization Explained
Learn why Java uses transient fields, how serialization works, and when to exclude fields from saved object state.
Why Printing "B" Can Be Slower Than "#" in Java Console Output
Learn why Java console printing speed can vary by character, especially in IDE consoles, and how buffering and rendering affect timing.
Why RecyclerView Doesn’t Have onItemClickListener() in Android
Learn why RecyclerView has no onItemClickListener(), how click handling works, and the best Android patterns for item clicks.
Why Seeded Random Produces Predictable Strings in Java
Learn why Java Random with fixed seeds prints predictable text like hello world, and how seeded pseudorandom generators work.
Why Sorted Arrays Can Be Faster in C++: Branch Prediction Explained
Learn why looping over a sorted array can run much faster in C++ and Java, mainly due to CPU branch prediction and predictable control flow.
Why Use Getters and Setters in Java? Accessors vs Public Fields
Learn why Java uses getters and setters, when they help, when public fields are fine, and how encapsulation affects real code design.
Why char[] Is Preferred Over String for Passwords in Java
Learn why Java often uses char[] instead of String for passwords, including security reasons, examples, mistakes, and best practices.
wait() vs sleep() in Java: Thread Coordination and Pausing Explained
Learn the difference between wait() and sleep() in Java, including locks, CPU usage, thread states, and when to use each one.
Page 6 of 6 - 117 questions