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?
posted 15 years ago
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
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads