Abstraction Program Java
Abstraction Program Java
java */
public abstract class Employee {
private String name;
private String address;
private int number;
Example
/* File name : Salary.java */
public class Salary extends Employee {
private double salary; // Annual salary
Here, you cannot instantiate the Employee class, but you can instantiate the Salary
Class, and using this instance you can access all the three fields and seven
methods of Employee class as shown below.