Java program to implement concept of Abstract Class
Simple Java program to implement concept of Abstract Class
Code:
abstract class phone{void rearcamera(){System.out.println("Capturing from rear camera");}
void rflesh(){System.out.println("Capturing from rear camera");}
void frontcamera(){System.out.println("Capturing from front camera");}
abstract void fflesh();
}
class model extends phone {
void fflesh(){System.out.println("No front flesh available");}
}
class abstracte{
public static void main(String arg[]){
model e70 = new model();
e70.rearcamera();e70.rflesh();e70.frontcamera();e70.fflesh();
}
}
Comments
Post a Comment