Answer to Question #241595 in Java | JSP | JSF for Zia

Question #241595

Hello Sir!

Attaching a link in which code is already written you just need to add the Main method so I can run the program. Thanks


https://drive.google.com/file/d/12ywHMF2l0bnQihN_SSFRXFMy1PLc3GwN/view?usp=sharing



1
Expert's answer
2021-09-24T18:58:09-0400
class A 
{ 
 int x, y; 
     void display() 
     { 
        System.out.println("Class A values="+x+" "+y); ; 
     } 
} 
class B extends A 
{
    
 int z; 
 void show() 
     { 
     System.out.println("Inside Class B values="+x+" "+y+" "+z);  
         
     } 
} 
public class Main{ 
    
    public static void main(String args[]) { 
        B b = new B(); 
        b.x=1; 
        b.y=2; 
        b.z=3; 
        b.display(); 
        b.show(); 
 } 
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS