Q. What will be the output of the following Java code?

Code:
class Output 
{
    public static void main(String args[]) 
    {    
         boolean a = true;
         boolean b = false;
         boolean c = a ^ b;
         System.out.println(!c);
    } 
}
  • (A) 0
  • (B) 1
  • (C) false
  • (D) true
πŸ’¬ Discuss
βœ… Correct Answer: (C) false

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
90
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
90%
Success Rate