package javaapplication23;
class employee
{
private int emp_id ;
private String emp_name ;
public void setid(int value)
{
emp_id=value;
}
public int getid()
{
return emp_id;
}
public void setname(String value)
{
emp_name=value;
}
public String getname()
{
return emp_name;
}
}
public class JavaApplication23 {
public static void main(String[] args)
{
employee e=new employee();
e.setid(1);
e.setname("ali");
System.out.println("EMPLOYEE ID "+e.getid());
System.out.println("EMPLOYEE Name "+e.getname());
}
}
No comments:
Post a Comment