| Author |
URGENT - Empty method and abstract method.
|
Anu
Ranch Hand
Joined: Oct 31, 2000
Posts: 54
|
|
What is the difference between abstract methos and a method without any body i.e. only empty braces are given for methos but no body is there. Why cant we use empty method in the place of abstract method ? Pls explain the usage/advantages/disadvantages of both....Its urgent !!!
|
 |
sandy gupta
Ranch Hand
Joined: Jan 30, 2001
Posts: 228
|
|
you do not have to provide the definition of a base class method but an abstract base class method needs to have a definition in the derived class Got it
|
Adios
|
 |
Sunny Liu
Ranch Hand
Joined: Mar 15, 2002
Posts: 63
|
|
You can not call a abstract method, but you can call empty method. class with a abstract method, then it have to be a abstract class, sequencely you can instantiate a abstract class as well. Usually you provide empty method just because you want to use some other methods from parent class or implements a interface but you do not want to implements all of methods defined in interface definition.
|
If I am rich, I will spend more.<p>IBM 486 (OOAD & UML) & 141 (XML) passed<br />Oracle 1Z0-007 passed<br />MCSD MCDBA MCSE <br />SCJP SCSSA<br />CCNA CNA A+
|
 |
 |
|
|
subject: URGENT - Empty method and abstract method.
|
|
|