import
java.util.ArrayList;
class
Employee {
private
String EmployeeName;
private
int
EmployeeId;
private
double
EmployeeSalary;
Employee(String name,
int
id,
double
salary)
{
this
.EmployeeSalary = salary;
this
.EmployeeName = name;
this
.EmployeeId = id;
}
public
String toString()
{
return
" Employee Name = "
+
this
.EmployeeName
+
" Employee Id = "
+
this
.EmployeeId
+
" Employee Salary = "
+
this
.EmployeeSalary;
}
}
public
class
GFG {
public
static
void
main(String[] args)
{
ArrayList<Employee> ArrList
=
new
ArrayList<Employee>();
ArrList.add(
new
Employee(
"Mukul"
,
1001
,
52000.0
));
ArrList.add(
new
Employee(
"Robin"
,
1002
,
65000.0
));
ArrList.add(
new
Employee(
"Rahul"
,
1003
,
53000.0
));
ArrList.add(
new
Employee(
"Suraj"
,
1004
,
45000.0
));
ArrList.add(
new
Employee(
"Akash"
,
1005
,
38000.0
));
for
(Employee t : ArrList) {
System.out.println(t);
}
}
}