import java.util.*;
import java.io.*;
class a1 {
{
emp_struct obj = new emp_struct();
obj.emp_id = br.readLine();
obj.name = br.readLine();
obj.
salary =
Double.
parseDouble(br.
readLine());
obj.dept = br.readLine();
try{
search(obj);
obj = input();
}
return obj;
}
boolean search(emp_struct obj)
{
int lastIndex = l1.lastIndexOf(l1);
int begIndex = 0;
for(begIndex =0;begIndex<lastIndex;begIndex++)
{
Object chkCase = l1.
get(begIndex
);
String chk = chkCase.
getEmpID();
if(chk.equals(obj.emp_id));
throw new DuplicateEntryException("Duplicate entry found");
}
return true;
}
{
}
}
class DuplicateEntryException
extends Exception { DuplicateEntryException
(String a
) {
detail = a;
}
{
return "User Defined Exception : "+detail;
}
}
class emp_struct {
public double salary;
{
return emp_id;
}
{
return emp_id+"\t"+name+"\t"+salary+"\t"+dept;
}
}