Hello all,
A question that might stupid to you who knows. But I cant find it in the
doc.
I want to play sounds, and I found code with :
AudioInputStream stream =
AudioSystem.getAudioInputStream(getClass().getResource(fnm));
"getClass" : what is the base object? I cant find it in the system object or
anywhere in the doc. It seems to be a default object.
Thanks, Francois
Stefan Ram - 05 Jun 2007 15:19 GMT
>AudioSystem.getAudioInputStream(getClass().getResource(fnm));
>"getClass" : what is the base object?
»this«?
Andrew Thompson - 05 Jun 2007 15:25 GMT
...
>"getClass" : what is the base object?
Any instance of an Object or any class that extends
it (explicitly or implicitly) (cough)..
<http://java.sun.com/javase/6/docs/api/java/lang/Object.html#method_detail>
(1st listed method)
..closely followed by..
<http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResource(java.lang
.String
)>

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Francois Lionet - 05 Jun 2007 15:40 GMT
> ..
>>"getClass" : what is the base object?
> Any instance of an Object or any class that extends
> it (explicitly or implicitly) (cough)..
So simple. Thanks.
Francois
Mike Schilling - 05 Jun 2007 23:14 GMT
> ..
>>"getClass" : what is the base object?
>
> Any instance of an Object or any class that extends
> it (explicitly or implicitly)
ITYM "(directly or indirectly)".
Roedy Green - 05 Jun 2007 23:22 GMT
On Tue, 5 Jun 2007 16:00:54 +0200, "Francois Lionet"
<flionet@hotmail.fr> wrote, quoted or indirectly quoted someone who
said :
>A question that might stupid to you who knows. But I cant find it in the
>doc.
[quoted text clipped - 5 lines]
>"getClass" : what is the base object? I cant find it in the system object or
>anywhere in the doc. It seems to be a default object.
this, which in that case would be the Applet object.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com