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 use a default constructor of a class even if an explicit constructor is defined?

1107


What Is Composition?

1061


What is pojo class in java?

1108


What is the base class of all classes?

1059


What does ide stand for?

950


What about main thread in java?

1129


What are the methods to rectify ambiguities in the interfaces in JAVA?

1090


What is an example of a conditional statement?

1057


How does hashset works in java?

1098


Can we have two methods in a class with the same name?

1054


Is string pool garbage collected?

1022


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

2183


Give the hierarchy of inputstream and outputstream classes.

1107


What is the indent key?

1040


Why there are some null interface in java? What does it mean?

1131