HOW TO DEFINE AN ABSTRACT CLASS?

Amit Singh

Total Post:565

Points:2825
Posted by  Amit Singh
Java 
 1044  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:565

    Points:2825
    How to define an Abstract class?

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!