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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compiler error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
240
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
89%
Success Rate