πŸ“Š JAVA
Q. Predict the output of following Java program
Code:
class Test {
  int i;
} 
class Main {
  public static void main(String args[]) { 
      Test t = new Test(); 
      System.out.println(t.i);
   } 
}
  • (A) garbage value
  • (B) 0
  • (C) compiler error
  • (D) runtime error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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