Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hasa;
- public class Employeee {
- int id;
- String name;
- Adress add;
- Employeee(int id,String name,Adress add)
- {
- this.id=id;
- this.name=name;
- this.add=add;
- }
- public void display()
- {
- System.out.println("Id= "+id);
- System.out.println("name= "+name);
- System.out.println("City= "+add.city);
- System.out.println("District= "+add.district);
- System.out.println("Country= "+add.country);
- }
- public static void main(String[] args) {
- Adress ob=new Adress("Dhanmodi","Dhaka","Bangladesh");
- Employeee ob1=new Employeee(12,"Bondhon",ob);
- ob1.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement