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

How do you escape sequences in java?

1114


What are checked exceptions?

1082


Explain the difference between string, stringbuffer and stringbuilder in java?

1059


What is the difference between actual and formal parameters?

1002


What is the static import?

1155


Can we modify the throws clause of the superclass method while overriding it in the subclass?

1084


What is http client in java?

1147


Why is the main method static?

1218


What is difference between c++ and java ?

1169


Can a final variable be initialized in constructor?

1023


What is class forname?

1095


What do you meant by active and passive objects?

1143


How do you declare an array that will hold more than 64KB of data?

1388


What is byte code and why is it important to java’s use for internet programming?

1201


What is variable and its types?

1083