How to define an Abstract class?

By: Karthik Printer Friendly Format    

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();

Ask a Question

Most Viewed Articles (in Interview )

Question: How is the MVC design pattern used in Struts framework?

What is Collection API?

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

Interview Question: What is Action Class?

Interview Question: What is EJB container?

Interview Question: What are the call back methods in Entity bean?

Question: What is the directory structure of a web application?

What do you understand by Synchronization?

What are the life-cycle methods of JSP?

Interview Question: What is Struts Validator Framework?

Interview Question: Why do we need Struts?

Interview Question: What is the difference between EAR, JAR and WAR file?

Interview Question: What is lazy loading?

Interview Question: What is the difference between Message Driven Beans and Stateless Session beans?

Question: What is a Hidden Comment in JSP?

Latest Articles (in Interview)

Comment on this tutorial