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 2 General Questions About Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "2 General Questions About Interfaces" Watch "2 General Questions About Interfaces" New topic

2 General Questions About Interfaces

Gary Farms
Ranch Hand

Joined: Jun 24, 2000
Posts: 57
Java supplied packages contain interfaces. An example is the Runnable interface in the java.lang package.
Q1) How Do I Go About finding out the names of all Java supplied
interfaces, and in what packages they are contained in?
Q2) If I create my own unique interface, where would I normally
put the interface definition (the method I'm calling with no
code body)? Must it be put in a package? If not, where else?

Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
The dicision on what package to put a class or interface in is exactly the same sort of decision as you make when you decide how to organize the directories on your C: drive. Some organization that makes sense to you. If you are a sloppy housekeeper you will probably just keep them all jumbled in main classpath directory.
Interfaces are all listed in the API in italics. Click on any one and it will show you what package that Sun decided to put it in.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: 2 General Questions About Interfaces
It's not a secret anymore!