In real time project when will we use Abstract class. and
what are the difference between abstract and interface.
Answer Posted / aravind
Depending upon the requirement.
Abstract class---->it contains zero or more abstract methods.
ex HttpServlet and GenericServlet
HttpServlet contains all sre concrete methods but it
declared as a Abstract class.
InterFace--->It contains all abstract methods.
if we extends the abstract class .there is chance to extend
another class.
if we implements the interface we can extends another class
| Is This Answer Correct ? | 17 Yes | 5 No |
Post New Answer View All Answers
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 ..
Do you think that java should have had pointers?
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
Explain the different types of memory used by jvm?
Why do threads block on i/o?
Is there a guarantee of uniqueness for entity beans?
To what value is a variable of the string type automatically initialized?
Explain what is synchronization?
What is the difference between RMI registry and OS Agent?
What are the sequence of steps to write pub or sub model kind of application?
Explain the advantages and disadvantages of detached objects.
When a thread blocks on i/o, what state does it enter?
What is a tasks priority and how is it used in scheduling?
What is the difference between the font and fontmetrics classes?
What happens when a thread cannot acquire a lock on an object?