Q. What is the output of this program?

Code:
class mainclass {
         public static void main(String args[])
          {
             boolean var1 = true;
 	    boolean var2 = false;
 	    if (var1)
 	      System.out.println(var1);
 	    else
 	        System.out.println(var2);
        }
      }
  • (A) 0
  • (B) 1
  • (C) true
  • (D) false
πŸ’¬ Discuss
βœ… Correct Answer: (C) true

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
188
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Kirti
Publisher
πŸ“ˆ
82%
Success Rate