File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt from Khalid Mughal  pgno:257 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt from Khalid Mughal  pgno:257" Watch "doubt from Khalid Mughal  pgno:257" New topic

doubt from Khalid Mughal pgno:257

sukhavasi vasavi
Ranch Hand

Joined: Jul 18, 2007
Posts: 59
abstract public class SyncTest implements Int1,Int2{

public void f(){

public void g(){

interface Int1{
int a=1;
int b=2;
void f();
void g();
interface Int2{
int b=3;
int c=4;
void g();
void h();
My doubt is How it compile correctly because there is an ambiguity in the function g().Please explain
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
It doesnt matter because interface is going to have only declaration, and actual implementation will be supplied by the class implementing the interface.

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
perakam gopi

Joined: Aug 09, 2007
Posts: 5

No your thinking in wrong way,here we are not doing any method overloading or overriding,just we are declaring an there is no problem it works correctly.
sukhavasi vasavi
Ranch Hand

Joined: Jul 18, 2007
Posts: 59
Yes.Now I got it
I agree. Here's the link:
subject: doubt from Khalid Mughal pgno:257
jQuery in Action, 3rd edition