This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
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!
posted 15 years ago
Since this is a duplicate, I am closing it.
"JavaRanch, where the deer and the Certified play" - David O'Meara