What Is The Output Of The Following Java Codep Pre Langjava #514
What is the output of the following Java code?</p> <pre><code class="language-java"> class Parameter { int num=10; Parameter() { System.out.print(num+" "); } Parameter(int num) { this.num = num; System.out.print(num+" "); } public static void main(String[] args) { Parameter obj = new Parameter(); System.out.println(obj.num); } } </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) - Types of Constructors - Quiz No.1.