Skills101
← All practice quizzes

Quiz: OOP Interview Questions

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

The 20 OOP questions asked most in campus interviews, with crisp answers, real-life examples and the follow-up questions interviewers usually ask next.

Log in to take the quiz

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

  1. Question 1

    Is Java a 100% object-oriented language?

  2. Question 2

    What does this print?

    class A { int x = 1; int get() { return x; } }
    class B extends A { int x = 2; int get() { return x; } }
    public class Main {
        public static void main(String[] args) {
            A obj = new B();
            System.out.println(obj.x + " " + obj.get());
        }
    }
    
  3. Question 3

    Can an abstract class have a constructor?

  4. Question 4

    Why doesn't Java allow multiple inheritance of classes?

  5. Question 5

    A Team holds Player objects created elsewhere; deleting the team doesn't delete players. This is: