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

What is the difference between abstract class and interface?

Answer Posted / srikanth reddy

1. Abstract classes may have some executable methods and
methods left unimplemented. Interfaces contain no
implementation code.
2. An class can implement any number of interfaces, but
subclass at most one abstract class.
3. An abstract class can have nonabstract methods. All
methods of an interface are
abstract.
4. An abstract class can have instance variables. An
interface cannot.
5. An abstract class can define constructor. An interface
cannot.
6. An abstract class can have any visibility: public,
protected, private or none
(package). An interface's visibility must be public or none
(package).
7. An abstract class inherits from Object and includes
methods such as clone() and
equals().

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In a container there are 5 components. I want to display the all the components names, how will you do that one?

1081


Can we have return statement in finally clause? What will happen?

1012


What is generics in java interview questions?

1138


Difference between character constant and string constant in java ?

1056


How can we make sure main() is the last thread to finish in java program?

1253


Why webdriver is an interface?

1091


How does hashmap work in java ?

1105


describe method overloading

1081


Is java a software?

1005


what is the final keyword denotes in java?

1157


What is the purpose of a default constructor?

1159


What is operator overloading. Is it is supported in java?

1088


Which is faster set or list in java?

1077


What data type is a string?

1059


Write a java program to check if a number is prime or not?

1081