Guest User

Untitled

a guest
Jun 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. package pkgday3;
  2.  
  3. public class Q5 {
  4. int empId=121;
  5. String name;
  6. int projectId;
  7. long phoneNumber=8964999700L;
  8.  
  9.  
  10. public static void main(String[] args) {
  11. PracticeHead p = new PracticeHead();
  12. p.display();
  13. p.modify();
  14. }
  15.  
  16. }
  17. class PracticeHead extends Q5
  18. {
  19. String practiceName="Shubham";
  20. int noOfCustomer=2;
  21. void modify()
  22. {
  23. this.noOfCustomer=5;
  24. this.phoneNumber=7827718534L;
  25. System.out.println("Updated details:" +this.noOfCustomer+" "+this.phoneNumber);
  26. }
  27. void display()
  28. {
  29. System.out.println(this.empId+" "+this.practiceName+" "+this.noOfCustomer+" " +this.phoneNumber);
  30. }
  31. }
Add Comment
Please, Sign In to add comment