How to define an Abstract class?

By: Karthik  

Answer: A class containing abstract method is called Abstract class. An Abstract class can't be instantiated.

Example of Abstract class:

abstract class testAbstractClass { 
    protected String myString; 
    public String getMyString() { 
        return myString; 
        } 
    public abstract string anyAbstractFunction();
}  




Most Viewed Articles (in Interview )

What are implicit Objects available to the JSP Page?

Interview Question: Why aren't the Struts tags maintained as part of the Jakarta Taglibs project ?

Interview Question: What is ActionServlet?

Interview Question: If the framework doesn't do what I want, can I request that a feature be added?

Interview Question: What about JSTL and JavaServer Faces ?

Interview Question: Is there a particularly good IDE to use with Struts ?

Interview Question: Why are some of the class and element names counter-intuitive?

Interview Question: Do ActionForms have to be true JavaBeans?

What do you understand by JSP Actions?

Explain the new Features of JDBC 2.0 Core API?

What is difference between Java Bean and Enterprise Java Bean?

How to define an Abstract class?

Interview Question: Where can I get help with Struts?

What is similarities/difference between an Abstract class and Interface?

What do you understand by a container?

Latest Articles (in Interview)

Comment on this tutorial