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...

This is my code i have a doubt

class ab implements a,b
{

public void add()
{
System.out.println("Hi")
}
}

interface a
{
public void add();
}

interface b
{
public void add();
}

in this code i have two interface implemented in the class
has same method.just i want to know which method of
interface implemented in the class. interface a or interface
b? confused me .

Answer Posted / kanu butani

There should be no confusion. Since both the interfaces are
been implemented and both have the same method, it will
work fine and will take any of the method.
Since there is no implementation in Interfaces it is
difficult to know which interface the method is read.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you read a char in java?

968


String class is defined under which package in java?

1034


Is java util regex pattern thread safe?

986


How many types of array are there?

964


What is the largest long allowed by java?

1021


Can you explain the final method modifier?

973


What is data object example?

948


What happens when heap memory is full?

936


Is void a data type in java?

938


What is a void in java?

1093


What are the principle concepts of oops?

926


what is predefined function in java?

948


What is the difference between method and means?

1032


Explain about exception propagation?

991


What is JDBC Driver interface?How can you retrieve data from the ResultSet

2061