Programming Tutorials

How to define an Abstract class?

By: Karthik in Interview Tutorials on 2012-06-16  

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





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

Question: What is a Hidden Comment in JSP?

What types of comments are available in the JSP?

What do you understand by a container in J2EE?

What is the difference between jsp:include page and @ include file?

Interview Question: Why does EJB needs two interfaces(Home and Remote Interface)?

What are the services provided by a J2EE container?

Interview Question: What is Deployment descriptor?

What do you understand by a J2EE module?

Interview Question: What is lazy loading?

Question: How would you go about analyzing performance of an application?

Question: Difference between forward and sendRedirect in JSP?

Types of Interviews

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

Interview Question: What is Message Driven Bean?

Interview Question: What is abstract schema?

Latest Articles (in Interview)