package mypack;
class Employee
{
private int eno;
private String name;
private String address;
public Employee(int eno, String name,String address)
{
this.eno=eno;
this.name=name;
this.address=address;
}
public String toString()
{
return eno+" "+name+" "+address;
}
}
class Emp
{
public static void main(String []args)
{
Employee e1=new Employee(111,"Amit","Pune");
System.out.println("Emp is -> "+e1);
}
}
class Employee
{
private int eno;
private String name;
private String address;
public Employee(int eno, String name,String address)
{
this.eno=eno;
this.name=name;
this.address=address;
}
public String toString()
{
return eno+" "+name+" "+address;
}
}
class Emp
{
public static void main(String []args)
{
Employee e1=new Employee(111,"Amit","Pune");
System.out.println("Emp is -> "+e1);
}
}
No comments:
Post a Comment