Skip to content

Commit

Permalink
updated display function
Browse files Browse the repository at this point in the history
  • Loading branch information
eieihtwesan committed Oct 6, 2024
1 parent 5caef3b commit 9fa7950
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/napier/sem/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ public void displayEmployee(List<Employee> emp)
{
if (emp != null && !emp.isEmpty())
{
System.out.println(String.format("%-10s %-15s %-20s %-8s", "Emp No", "First Name", "Last Name", "Salary"));
for (Employee employee : emp) {
System.out.println(
employee.emp_no + " " + employee.first_name + " " + employee.last_name + " " + " Engineer" + " " + employee.salary + "\n");
System.out.println(String.format("%-10s %-15s %-20s %-8s",
employee.emp_no + " " + employee.first_name + " " + employee.last_name + " " + " Engineer" + " " + employee.salary ));
}
}
}
Expand Down

0 comments on commit 9fa7950

Please sign in to comment.