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

Popular posts from this blog

C program to evaluate Prefix Expression using Stack data structure

Java Program to Implement sorting algorithm using TCP on Server application

C++ program to perform data transformation Min-max and Z score Normalization