What Will Be The Output Of The Following Java Codep Pre #550
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 push() { System.out.println(a<<b); } public static void main(String[] args) { Main a = new Main(27, 2); Main b = new Main(a); b.push(); } }</code></pre>
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.