Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pkgday3;
- public class Q5 {
- int empId=121;
- String name;
- int projectId;
- long phoneNumber=8964999700L;
- public static void main(String[] args) {
- PracticeHead p = new PracticeHead();
- p.display();
- p.modify();
- }
- }
- class PracticeHead extends Q5
- {
- String practiceName="Shubham";
- int noOfCustomer=2;
- void modify()
- {
- this.noOfCustomer=5;
- this.phoneNumber=7827718534L;
- System.out.println("Updated details:" +this.noOfCustomer+" "+this.phoneNumber);
- }
- void display()
- {
- System.out.println(this.empId+" "+this.practiceName+" "+this.noOfCustomer+" " +this.phoneNumber);
- }
- }
Add Comment
Please, Sign In to add comment