Hi pooja,,
u r under the topic Jsp, not core java.
post ur qureies out there..
here is the ansewer.
->Abstract Class.
A class which contains a pure abstract method is called abstract class.
You cannot create object from abstract class.
Any class extends the abstract class has to define the body for the abstract method defined in the abstract class, else declare that class also abstract.
->How to declare?
use the 'abstract' keyword.
Best solution.
Refer a book for core java.
abstract class is the class that contains some methods with out the implementation (method header without implementaion) and it is not possible to instatiate object from this class , in the other side u have concrete class with is the normal one ( method headr and implementation) here is the sytax:
public abstract class_name
{
public return_data_type method_name (patameter list)
{} //this method has implementation
public return_data_type method_name (patameter list);
//this method has not implementation
}
abstract class is the class that contains some methods with out the implementation (method header without implementaion) and it is not possible to instatiate object from this class , in the other side u have concrete class with is the normal one ( method headr and implementation) here is the sytax:
public abstract class_name
{
public return_data_type method_name (patameter list)
{} //this method has implementation
public return_data_type method_name (patameter list);
//this method has not implementation
}
according to me
abstract classes can or not have the method implementation
as in interfaces
but abstract class can contain method bodies/implementation that is
this class can provide the basic functioning of the method and let the concrete class impement the extended functionality.
Thanks
MaheshP.
Suresh_hi,
> You cannot create object from abstract class.
Check this statement...You can create object of an abstract class but objects of that class almost have no meaning. That is, it is meant to express only the interface, and not a particular implementation, so creating an object of a class makes no sense.
Try to read Thinking in Java by Bruce Eckel...
omen,