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 are the four access levels in Java and who can see each one?

    private is visible only inside the class. Default (no keyword) adds the same package. protected adds subclasses in other packages. public is visible everywhere.

    BeginnerQuick answer1 min read