What Will Be The Output Of The Following Java Code P Pre #549

What will be the output of the following Java code? </p> <pre><code class="language-java"> import java.util.*; public class Main { int a,b; Main(int i, int j) { a=i; b=j; } Main(Main m) { a=m.a; b=m.b; } void change(int i, int j) { a=i; b=j; } public static void main(String[] args) { Main a = new Main(5, 10); Main b = new Main(a); System.out.println(a.a*a.b); System.out.println(b.a*b.b); a.change(30,40); System.out.println(b.a*b.b); } }</code></pre>

Online Quiz This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Class Components (Using Java) - Copy Constructors - Quiz No.2.


Similar question(s) are as followings:



Online Quizzes of gs111 OOP Object Oriented Programming Java

Choose an organization

Theme Customizer

Gaussian Texture



Gradient Background