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

What is the output of the given code?

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

  1. 64

  2. 59

  3. 62

  4. 63

  5. 77

Reveal answer Fill a bubble to check yourself
D 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 program? public class HelloWorld { public static void main(String[] args) {...
  • What is the output of the given java code? public class HelloWorld{public static void main(String []args){S...
  • What is the output of the given java code? public class HelloWorld{public void ret(int a, int b){double res...
  • 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 code? public class HelloWorld{public void ret(int a, int b) {double re...
  • What will be the output of the program? class Test { public static void main(String [] args) { int x= 0; in...
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