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

If try block is successfully executed, Then Is Finally block executed?

1037


Explain about serializable interface in java?

934


What is r * in math?

936


Explain wait(), notify() and notifyall() methods of object class ?

983


What is use of functional interface in java 8? Explain

944


What are void methods?

979


What is cr keyboard?

1139


What is the difference between form & report?

988


How many characters is 16 bytes?

944


What does system out println () do?

965


What is garbage collection? What is the process that is responsible for doing that in java?

1056


What is java dot?

886


Why do we need array in java?

957


Can a class have multiple constructors?

961


How do you create a sop?

945