How to create a abstract class?
Basic of a abstract class.
package AbstractClass; /** * * @author MindClues */ public class Design { public static void main(String[] args) { Circle obj = new Circle(); obj.area(); obj.detail(); } } class Circle extends Trangle { public void area() { System.out.println("Area method implementation"); //To change body of generated methods, choose Tools | Templates. } public void detail() { System.out.println("Detail method implementation"); } } abstract class Trangle { public abstract void area(); abstract void detail(); }
Area method implementation Detail method implementation
post a comment