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

Can you extend more than one interface?

Answer Posted / swapnil bhosale

hey you all my friends ,we can not extends interface ,we can only implements it,is it true we can implement more than one
interface ,but can not extends it (not single not more)

run the following code so you could understand difference between extends and implements keyword

//code using extends keyword
import java.io.*;
interface A{}
interface X{}
interface Y{}
class ExDemo extends A,X,Y
{
public static void main(String arg[])
{
int a;
System.out.println("hey it works");
}
}

//code using implements keyword
import java.io.*;
interface A{}
interface X{}
interface Y{}
class ExDemo implements A,X,Y
{
public static void main(String arg[])
{
int a;
System.out.println("hey it works");

}
}

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is not thread safe?

963


What is the difference between && and & in java?

1056


What is the impact of declaring a method as final?

1006


What is a for loop in java?

1028


What is the importance of finally block in exception handling?

1006


Will minecraft java be discontinued?

1148


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

2078


What is command line argument in java?

1130


Why singleton pattern is better than creating singleton class with static instance?

986


What is import java util arraylist?

1160


What is a container in a gui?

964


What is a Null object?

1594


what is object slice?

2056


What are the two ways to create a thread?

989


How many types of interfaces are there?

1040