Can anyone help on how to get the employee with the highest net pay using Java?
import java.util.*; public class LabExercise { public static void main (String[] args) { double grossPay; int hoursWorked; int ratePerHour; double totalDeduction; double amountTax; double amountSSS; double amountPhilhealth; double netPay; String nameOfEmployee; int numberOfEmployees; int initialNumberOfEmployees = 1; Scanner input = new Scanner (System.in); System.out.print("Enter number of employees: "); numberOfEmployees = input.nextInt(); while (initialNumberOfEmployees <= numberOfEmployees) { System.out.println("\nEmployee No. " + initialNumberOfEmployees); input.nextLine(); System.out.print("Enter Employee Name: "); nameOfEmployee = input.nextLine(); System.out.print("Enter Hours Worked: "); hoursWorked = input.nextInt(); System.out.print("Enter Rate per Hour: "); ratePerHour = input.nextInt(); grossPay = hoursWorked * ratePerHour; System.out.println("Gross Pay: " + grossPay); amountTax = grossPay * 0.12; System.out.println("Tax: " + amountTax); amountSSS = grossPay * 0.05; System.out.println("SSS: " + amountSSS); amountPhilhealth = grossPay * 0.02; System.out.println("Philhealth: " + amountPhilhealth); totalDeduction = amountTax + amountSSS + amountPhilhealth; System.out.println("Total Deduction: " + totalDeduction); System.out.println("Employee Name: " + nameOfEmployee); netPay = grossPay - totalDeduction; System.out.println("Net Pay: " + netPay); initialNumberOfEmployees++; } input.close(); } }