Interview Q&A / Java

INTERVIEW Q&A · 72 QUESTIONS

Java interview questions

Collections, the JVM, strings, exceptions and threads, the backbone of most campus placement rounds.

  1. What is the difference between encapsulation and abstraction in Java?

    Abstraction hides complexity by showing only what a user needs, usually through interfaces or abstract classes. Encapsulation hides data by keeping fields private and exposing controlled methods. One is about design, the other about protection.

    BeginnerQuick answer1 min read