Skills101
← All practice quizzes

Quiz: Java Interview Questions

5 questionsNo time limitPass: 60%+10 XP on first pass

The 25 Java questions asked most in campus and off-campus interviews, with crisp answers and code where it helps — JVM, OOP, strings, collections, exceptions and Java 8.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Can a static method be overridden?

  2. Question 2

    What does this print?

    public class Main {
        public static void main(String[] args) {
            String s = "Hi";
            StringBuilder sb = new StringBuilder("Hi");
            System.out.println(s.equals(sb.toString()) + " " + s.equals(sb));
        }
    }
    
  3. Question 3

    Which is used to implement the Singleton pattern?

  4. Question 4

    When does the finally block NOT run?

  5. Question 5

    flatMap is used to: