siva sankara kumar

Greenhorn
+ Follow
since Jan 28, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by siva sankara kumar

hai sri


Abstract class is to avoid object creation
in this, defined and abstract method is possible the abstract method should override.

for example consider "livin_being" as a class in this catagory human ,animal or living being are possible so we can declare generalised class as abstract from this we can extend subclass such human,animal,etc.,


Interface is totally different concept don't relate with abstract

it is just like a template, if we need we can use it, if we use interface we must override because,
all the methods are abstract method. it is one way of achieveing multiple inheritance but java never support multiple inheritance


so don't compare abstract and interface
hai sri


Abstract class is to avoid object creation
in this, defined and abstract method is possible the abstract method should override.

for example consider "livin_being" as a class in this catagory human ,animal or living being are possible so we can declare generalised class as abstract from this we can extend subclass such human,animal,etc.,


Interface is totally different concept don't relate with abstract

it is just like a template, if we need we can use it, if we use interface we must override because,
all the methods are abstract method. it is one way of achieveing multiple inheritance but java never support multiple inheritance

by siva

so don't compare abstract and interface
Hai sri,

Consider You as an example,

When You are a student You have some behaviour,

When You are a Employee You have some behavious

According to the situation you are having different characterstic

this is the actual meaning of polymorphism

for example You have all characteristic belong to Your father is applicable, but the reverse process is not possible, this way you can relate base class and derived class

by

siva