• Post Reply Bookmark Topic Watch Topic
  • New Topic

getAudioClip  RSS feed

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i heard that method getAudioClip returns the reference of class which implements the interface AudioClip..but i coudn't find
the implemented subclass in java documentation..i think it has been hidden from us ..if it is,why the implemented subclass
is hidden
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

but i coudn't find the implemented subclass in java documentation..i think it has been hidden from us ..if it is,why the implemented subclass is hidden


Because the developer does not need to know what class implements an interface; he only needs to know that the object implements the AudioClip interface. It also depends on the JRE you're using - Oracle's JRE probably uses a different class than Apple's JRE.
If you're really curious, you can examine "clip.getClass().getName()" - that'll tell you the fully qualified class name of the object.

You can find more information about the concept by searching for "programming to the interface"; it's a very useful notion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!