Does anyone know of a good tutorial on how to read and interpet the Java docs? Everything I'm doing is telling me that I can make some real strides if someone could just expline to me how to interpet them. Thanks
Please be more specific. What are you having trouble understanding?
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Serapio Perez III
Joined: Aug 08, 2002
Ok, when I look at the java API I really don't have any idea what any of it means. 1) how does one interpet them (read them)? Example: I look up Applet then say I want my applet to play a sound. I found this: public AudioClip getAudioClip(URL�url, String name) so do I just enter that method after importing Applet? With the two variables (URL http://www.whatever.com, String tune.wav)? And then when the applet opens up it plays the sound? I did try this and the first thing I encountered was that I had to use the escape characters for the forward slashes in the URL, but it still didn't compile. If I could just make some sense of things like this I'm sure it would help. Thanks
It seems that if you want to play a sound that you would look for a method named play(). If you put the String with the file name in the same directory as the applet, this should play for you.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Joined: Jul 22, 2000
So do I just enter that method after importing Applet?
With the two variables (URL new URL("http://www.whatever.com"), String "tune.wav")? String has to be in String format. URL has to be in URL format (click on the hyperlink from the method you're in to URL and it will tell you how to construct a URL).
Escaping backslashes (and other characters) is not in the API. It is basic Java. I suggest you look at the Java Tutorial for some basic concepts. [ September 03, 2002: Message edited by: Marilyn de Queiroz ]
This isn't a super easy solution, but it's a very practical and reasonable approach to learning how to program in Java. Reading between the lines of your posts, that's what I'm understanding you are wanting to do. Hit the free tutorials available on-line. The short list of free Java tutorials that I have found useful include:
The API documentation is going to specify what methods and properties the classes have and how (generally) they can be used. If you're looking to better understand the life cycle of an Applet (and what and when methods are invoked automatically by the browser), then do read the API documentation, read Sun's Java Tutorial on the subject, and, of course, ask questions here.
Don't feel bad about having problems with the API Serapio. I felt the same as you did/do. But what I finally figured out, well before the luxury of JavaRanch, is that the API is not a tutorial. To me, the API was not helpful at all until I understood the JAVA language. Then all of a sudden, everything made sense. Well, almost everything. I still look at the API sometimes and think "What is Sun thinking?" Just didn't want you to think you were alone.