Preview:
import java.util.Scanner;
class EmployeeDriver{
 public static void main(String args[]){
 Scanner sc=new Scanner(System.in);
 Employee e1=new Employee();
 System.out.println("Enter Employee 1 Details : ");
 System.out.print("Enter ID : ");
 e1.setEno(sc.nextInt());
 System.out.print("Enter Name : ");
 e1.setName(sc.next());
 System.out.print("Enter Designation : ");
 e1.setDesignation(sc.next());
 System.out.println("Enter Employee 2 Details : ");
 System.out.print("Enter ID : ");
 int e=sc.nextInt();
 System.out.print("Enter Name : ");
 String name=sc.next();
 System.out.print("Enter Designation : ");
 String designation=sc.next();
 Employee e2=new Employee(e,name,designation);
 System.out.println("Employee 1 Details : ");
 System.out.println(e1.getEno()+" "+e1.getName()+" "+e1.getDesignation());
 System.out.println("Employee 2 Details : ");
 System.out.println(e2.getEno()+" "+e2.getName()+" "+e2.getDesignation());
 }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter