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?where we can use it in realtime projects?

Answer Posted / vishal srivastava

Abstract Class | Interfaces
|
1. Starts with a class keyword | Starts with interface
| keyword
2. abstract modifier has to be | No need to provide abstract
provided | modifier (100 % Abstract)
3. Not necessary to contain | All methods are by default
abstract methods, but if a | public and abstract, and
class has abstract method | all attributes are public
then class has 2 be abstract| static, and final (FIELDS)
4. Says what a class should be | Says how a class must
like, behaves like a model | behaves and what it is
| able to do
5. Therefore, Generally given | Thus, given names as
class name as Nouns | Adjectives
6. Used for group of related | Any class can implement
classes only | interfaces
7. Single inheritance is | Multiple inheritance can
allowed only | be achieved
8. All class behaviours are | Cannot have constructors,
allowed, except creating | should initialise its
objects of abstract classes | Fields

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

958


What is stringbuffer in java?

1000


what do you understand by synchronization? : Java thread

938


What is the use of private static?

1002


What is a short in java?

961


What is a copy constructor in java?

1047


Write a code to show a static variable?

1031


Why java is not 100% object-oriented?

1429


What is the meaning of I ++ in java?

1098


What is flush () in java?

951


What is method and methodology?

1048


Is binary a low level language?

867


Can a variable be local and static at the same time?

941


What is the difference between variable & constant?

962


what is the difference between Object Based Language and Object Oriented Language?

970