0

If I have for example a class Foo and also an abstract class Bar and an interface Fizz, can the class implement both in its declaration? Or should the interface first be implemented in the abstract class?

I ask because of this UML Chart: (! the unfilled arrow should point to the abstract class to show that its inherited from the abstract class !)

enter image description here

public class Foo extends Bar implements Fizz {
   ...
}

Is my class declaration correct?

Mel Torment
  • 49
  • 1
  • 7

1 Answers1

1

Yeah you can. The only thing you can't do with class declarations is extend multiple classes.

Pieter Mantel
  • 123
  • 1
  • 9