HOW TO DEFINE AN ABSTRACT CLASS?

Amit Singh

Total Post:562

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

    Post:562

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

      Modified On Mar-27-2018 12:10:39 AM

Answer

NEWSLETTER

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