Question: public class A { public static void main(String[] args) { int n; System.out.println(A1: + n); } void a(int n) { n++; } The code prints
public class A { public static void main(String[] args) { int n; System.out.println("A1:" + n); } void a(int n) { n++; } The code prints "A11| The code has a compile error because the "a" method is not called. The code prints "A1:0". The code has a compile error because variable "n" is not initialized
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
