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 How Are Interfaces Implemented? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How Are Interfaces Implemented?" Watch "How Are Interfaces Implemented?" New topic

How Are Interfaces Implemented?

Gary Farms
Ranch Hand

Joined: Jun 24, 2000
Posts: 57
I have questions concerning Java interfaces. They are:
Q1) Must an interface be defined in a separate .java file?
Q2) Can an interface be defined in the same class file that calls
Q3) Are interfaces used only for methods & data already
defined in Java supplied packages?
Q4) Aren't interfaces also used to stub methods which are
defined (but not yet written) in order to get a clean
Any examples of a simple interface implementation would also be very helpful. Thanks!
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Since this is a duplicate, I am closing it.

"JavaRanch, where the deer and the Certified play" - David O'Meara
It is sorta covered in the JavaRanch Style Guide.
subject: How Are Interfaces Implemented?
Similar Threads
what is exactly stands for Marked interface?
Doubt in Generics. pl help
interface and abstract class
implementing an interface without methods