Complicated Java Interface Question.

statik213

Golden Member
Oct 31, 2004
1,654
0
0
See attached code first.
FooBar implements Bar1 and Bar2 both of which require implementation of baseMethod what happens when an instance of FooBar f's baseMethod() is called insize Biz's main?

 

akubi

Diamond Member
Apr 19, 2005
4,392
1
0
doesn't matter since interfaces do not define the methods.

no code is ever run "inside" of an interface, so you don't have to worry about which interface is the one being "called."

what's the problem?
 

statik213

Golden Member
Oct 31, 2004
1,654
0
0
Just making sure, so baseMethod() in FooBar would be called exactly one time per call of FooBar.baseMethod right?