What will be the output of the following code? explain the flow . - ProProfs Discuss
Topics
Products
Follow Us:

What will be the output of the following code? explain the flow . public class Main { public static void main(String []args) {A p1 = new A(7); A p2 = new A(p1); } } class A{ int x; A(A p){p.x=3; x=9;} A(int x){this.x = x;} }?

Asked Anonymously, Last updated: Feb 15, 2020

+ Answer
Request

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.