Home / Programming MCQs / JAVA MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q. What is the output of the below Java program?

Code:
public class TestingMethods5
{
  public static void main(String[] args)
  {
    int localVariable;
    System.out.println(localVariable);
  }
}
(A) 0
(B) garbage value
(C) NullPointerException
(D) Compiler error

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.