This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes getAudioClip Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "getAudioClip" Watch "getAudioClip" New topic
Author

getAudioClip

saravanan ragunathan
Ranch Hand

Joined: Aug 02, 2010
Posts: 84


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


"I Love Java Ranch"
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: getAudioClip
 
Similar Threads
Add music to applet?
interfaces
How to use AudioClips in applet
Sound not loading
sound in an applet not working