Sollicitatievraag bij Google

What is the difference between an interface an an abstract class in Java?

Antwoord op sollicitatievraag

Anoniem

29 jan 2012

- Interfaces represent qualities/attributes (e.g. "Sortable", "Comparable", etc.), whereas an abstract class usually represents a noun. - Classes can implement multiple interfaces, but can only extend a single abstract class. - Abstract classes can provide implementations for some methods, and can contain instance variables, whereas interfaces cannot.

1