aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java (GATE)
  • What is the output of the given program? ```java public c...
Multiple choice

What is the output of the given program?

public class HelloWorld {
 public static void main(String[] args) {
  int x = 24;
  int y = 42;
  System.out.println((~x) | (~y));
 }
}

  1. - 25

  2. - 43

  3. - 9

  4. - 6

  5. Compiler error

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct answer.

Keep practicing — related questions

  • What is the output of the given code? public class HelloWorld { public static void main(String[] args) { in...
  • What is the output of the given program? public class HelloWorld { public static void main(String[] args) {...
  • What is the output of the given code? public class HelloWorld { public static void main(String[] args) { in...
  • What is the output of the given java program? public class HelloWorld{public static void main(String []args...
  • What is the output of the following program? public class example { public static void main(String args[]) ...
  • What is the output of the given java program? public class HelloWorld{ public static void main(String []arg...
  • What is the output of the given java program? public class HelloWorld{public static void main(String []args...
  • What is the output of the given java program? public class HelloWorld{public static void main(String []args...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy