Write a program to read ID, Name, address, salary of twenty employees from keyboard and write in into the file “emp.doc”. Again read records of the employees and display records of those students whose salary is more than 25000.
//Employee.java import java.io.RandomAccessFile; import java.util.Scanner; public class Employee { private int id; private String name; private String address; private double salary; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } public static void main(String []args) { final int size = 20; int i; Employee e[] = new Employee[size]; Scanner sc = new Scanner(System.in); int id; String n; String a; double s; //setting student objects for(i=0; i<size; i++) { e[i] = new Employee(); System.out.println("Enter id of emp "+(i+1)+":"); id = sc.nextInt(); System.out.println("Enter name:"); n = sc.next(); System.out.pri