File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Using Someone Else's Class(es) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using Someone Else Watch "Using Someone Else New topic

Using Someone Else's Class(es)

Karen Baog
Ranch Hand

Joined: Mar 02, 2005
Posts: 120
Hi guys,

If someone provides me a .class how can I use it together with my other class(es) to run it?

What do I need to know about this other .class so I can use it?
How do I use it if this .class has public methods (don't care about the implementation, just wants to use it).


amerzil co-ed student<br />"Praise be the Code"
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

The person who gave you the .class file typically tells you the name of the class and the public methods in it. This could be in the form of JavaDoc or even a list.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Patrick Mallahan
Ranch Hand

Joined: Apr 22, 2005
Posts: 69
you can also just look at the code and figure it out yourself. but mainly all you do is import it into the other code that you want to use it in.
I agree. Here's the link:
subject: Using Someone Else's Class(es)
jQuery in Action, 3rd edition