Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2. package hasa;
  3.  
  4. public class Employeee {
  5. int id;
  6. String name;
  7. Adress add;
  8. Employeee(int id,String name,Adress add)
  9. {
  10. this.id=id;
  11. this.name=name;
  12. this.add=add;
  13. }
  14. public void display()
  15. {
  16. System.out.println("Id= "+id);
  17. System.out.println("name= "+name);
  18. System.out.println("City= "+add.city);
  19. System.out.println("District= "+add.district);
  20. System.out.println("Country= "+add.country);
  21.  
  22. }
  23. public static void main(String[] args) {
  24. Adress ob=new Adress("Dhanmodi","Dhaka","Bangladesh");
  25. Employeee ob1=new Employeee(12,"Bondhon",ob);
  26. ob1.display();
  27.  
  28. }
  29.  
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement