DEVFYI - Developer Resource - FYI

How to define an Abstract class?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

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

(Continued on next question...)

Other Interview Questions