**Gross salary = Net Salary - Deduction**).

Salary Deduction = Tax ( Provident Fund - Professional Tax - Income Tax).

To find the gross salary of the Employee we need to calculate DA and HRA Then the Sum of

**Gross Salary Formula in Java**

**Gross Salary**= Basic Salary + HRA + Other Allowances

**Deduction**= Gross Salary - PF - PT - IT.

**Net Salary**= Gross Salary - Deduction.

**See Also**C++ Program For Find The Gross Salary of an Employee

To find the gross salary of the Employee we need to calculate DA and HRA Then the Sum of

**Basic Salary + HRA + DA**. after calculating the sum print the sum. So basically first we calculate a DA, and HRA after that we add

**Basic Salary + HRA +DA**so, in this way, we can find the Gross salary of an employee.

## Gross Salary Program in Java

import java.util.Scanner;
/* gross salary program in java */
class employeesalary {
public static void main(String args[]) {
float basic_salary, da, hra, da1, hra1, GrossSalary;
Scanner scan = new Scanner(System.in);
System.out.println("Enter Basic Salary Of Employee: ");
basic_salary = scan.nextFloat();
System.out.println("Enter Basic DA Of Employee: ");
da1 = scan.nextFloat();
System.out.println("Enter Basic HRA Of Employee: ");
hra1 = scan.nextFloat();
da = (da1 * basic_salary) / 100;
hra = (hra1 * basic_salary) / 100;
GrossSalary = basic_salary + da + hra;
System.out.println("Gross Salary Of Employee: " + GrossSalary);
}
}

## 0 Comments: