Skip to main content
added 20 characters in body
Source Link
Asaph
  • 163.5k
  • 25
  • 204
  • 204

So I have a class catcat which implements a interface VocalVocal, I was wondering why when iI created a ArrayList(Vocal)ArrayList(Vocal) I was able to add catsinstances of cat to it?

Thank You

So I have a class cat which implements a interface Vocal, I was wondering why when i created a ArrayList(Vocal) I was able to add cats to it?

Thank You

So I have a class cat which implements a interface Vocal, I was wondering why when I created a ArrayList(Vocal) I was able to add instances of cat to it?

Thank You

Source Link
panda
  • 11
  • 1

Interfaces in Java

So I have a class cat which implements a interface Vocal, I was wondering why when i created a ArrayList(Vocal) I was able to add cats to it?

Thank You