In real time project when will we use Abstract class. and
what are the difference between abstract and interface.

Answer Posted / avinash

In Real time,we use Abstract class when we want the
implemented functionality to be used . In Abstract class ,
there may contain Abstract methods or non abstract
methods(concrete methods).

When we dont want the functionality provided by the abstract
class then we are going to make use of Interface. we
directly implement the interface and provide functionalities
for the abstract methods.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the call back methods in entity bean?

566


How many times may an objects finalize() method be invoked by the garbage collector?

674


What is Stream Tokenizer?

1732


Describe responsibilities of Activator?

1677


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

574






What is a class loader? What are the different class loaders used by jvm?

587


Is the infobus client side only?

614


whats is mean by tiles in struts

1624


What is the purpose of the notify() method?

600


What is RMI and what are the services in RMI?

613


Is a class a subclass of itself?

592


What modifiers may be used with an interface declaration?

561


what is a portable component?

1470


What is an abstract method?

596


cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..

1740