aspose file tools*
The moose likes Beginning Java and the fly likes How to interpet the Java API's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to interpet the Java API Watch "How to interpet the Java API New topic
Author

How to interpet the Java API's

Serapio Perez III
Greenhorn

Joined: Aug 08, 2002
Posts: 3
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


Evil hacker, cough, cough
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
Please be more specific. What are you having trouble understanding?


Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Serapio Perez III
Greenhorn

Joined: Aug 08, 2002
Posts: 3
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
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10

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
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
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 ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
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:
  • Sun's Java Tutorial
  • Introduction to Computer Science using Java by Bradley Kjell
  • Introduction to Programming Using Java by David J. Eck
  • and Dick Baldwin's Java Programming Tutorials

  • 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.


    [How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
    Dirk Schreckmann
    Sheriff

    Joined: Dec 10, 2001
    Posts: 7023
    I just noticed that part of Sun's Applet Tutorial is called Playing Sounds. Perhaps it has some information that you'd find useful.
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15286
        
        6

    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.


    GenRocket - A Test Data Generation Platform
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: How to interpet the Java API's
     
    Similar Threads
    Help me optimize this query
    open a pdf inline using MIME in ie7
    What should be the Correct order in web.xml file
    Confuse the findByCriteria()
    Binary/Octal/Hex and Decimal Number Systems