This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How Are Interfaces Implemented?  RSS feed

 
Gary Farms
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
it?
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
compile?
Any examples of a simple interface implementation would also be very helpful. Thanks!
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this is a duplicate, I am closing it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!