Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getAudioClip

 
saravanan ragunathan
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
 
Lester Burnham
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!