class employee{
    String name;
    int id;
    employee(String name,int id){
        this.name=name;
        this.id=id;
    }
    public void introduce(){
        System.out.println("I am "+name);
    }
}
class departments extends employee{
    String department;
    departments(String name,int id,String department){
        super(name,id);
        this.department=department;
    }
    public void dept(){
        System.out.println("I am working in "+department);
    }
}
public class Main{
    public static void main(String[] args){
        departments leela=new departments("leelaratnasree",5,"production department");
        leela.introduce();
        leela.dept();
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: