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

Write a program to print fibonacci series up to count 10.

864


What is object data type?

960


Why array is used in java?

935


What is treemap in java?

910


Is 64bit faster than 32 bit?

1026


What is Java Reflection API? Why it’s so important to have?

1101


How do you compare arrays in java?

905


Write a java program to print fibonacci series?

918


How do you define a method?

943


What are the application of stack?

880


Differentiate between class and structure.

1080


Can a method be static?

932


Write a program to print count of empty strings in java 8?

953


What is a Transient Object?

1040


What are assembly attributes?

969