Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

interface X{
void m1();
void m2();
}

class Child2 extends Object implements X {

public void m1(){
System.out.println("Child2 M1");
}
public void m2(){
System.out.println("Child2 M2");
}

}
public class ParentChildInfterfaceDemo {

public static void main(String[] args){
X x = new Child2();
X x1 = new Child2();
x.m1();
x.m2();
x.equals(x1);
}

}
Will the above code work?
If yes? Can you please explain why the code
x.equals(x1) will work as the equals method is called on
interface reference vaiable?

Answer Posted / mayank sharma

no answer will be possible of this question

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we split string with in java?

948


Does list allow duplicates in java?

882


I want to re-reach and use an object once it has been garbage collected. How it's possible?

954


What is diamond operator in java?

896


What is the use of coding?

911


Which is the best sorting technique in java?

930


Is empty set an element of empty set?

1030


Can a class have multiple superclasses?

1077


What is the benefit of inner classes in java?

1040


What is string variable?

986


What is a singleton puppy?

920


Can you declare an interface method static?

1008


What is an 8 bit word?

1001


What is procedure overloading?

2241


Can we define private and protected modifiers for the members in interfaces?

1044