interface A
    public boolean bA=true;
    public boolean bB=true;
    public boolean bC=true;

interface B extends A
    boolean bA=false;/*(here bA i think is ambiguous how does compiler know which value to take )*

class C implements B
    public void printbool()
public class demointerface implements B{
public static void main(String []args)
    C c=new C();


/*here OUTPUT is as follows

BUILD SUCCESSFUL (total time: 1 second)


Dont hide your questons inside your unformatted code which is even without code tags.
Be specific about your problem. That way we can help you better.
Keep that in mind and read the community rules before posting.
Good Luck.

When you extend a class or interface, any members that you re-define in the subclass/interface override the definition in the superclass/interface.
So there is no ambiguity.
If you have an instance of B then the definition in B applies (if it is not defined in B, then it inherits the definition from A), if you have an instance of A then the definition in A applies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.