employer cover photo
employer logo
employer logo

Tata Consultancy Services

Parte di Tata Group

Questa è la tua azienda?

Domanda di colloquio di Tata Consultancy Services

They asked: "Can you explain the difference between an abstract class and an interface in Java?"

Risposta di colloquio

Anonimo

18 lug 2025

I explained that an abstract class can have both abstract and non-abstract methods, and it supports default behavior. An interface, on the other hand, is completely abstract (before Java 8) and is used to achieve full abstraction. I also mentioned that Java allows multiple interfaces to be implemented, which helps in resolving the issue of multiple inheritance.