JAVA UNIT-2 2MARKS
JAVA UNIT-2 2MARKS
Q28. Give an Example of class Declarations Class with the abstract modifier ?
Answer: Class with the abstract modifier are declared as follows
package pack1;
abstract class Myclass{
abstract void display();
}
A class declared abstract must have one or more abstract methods as its members that is
methods without a body; it is only the header of a method followed by semicolon.