This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "2 General Questions About Interfaces" Watch "2 General Questions About Interfaces" New topic
Author

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"
Sheriff

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: http://aspose.com/file-tools
 
subject: 2 General Questions About Interfaces
 
Similar Threads
How Are Interfaces Implemented?
Interfaces
Interface & Implementation class location
Generating Lists of Packages and Classes
how to name and save the Television interface