aliensbrain
  • Home
  • Topics
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and J2EE Programming Quiz
  • what is the output of the following program...
Multiple choice java

what is the output of the following program

  1. 0

  2. -1

  3. -2

  4. compiler error

Reveal answer Fill a bubble to check yourself
C Correct answer

Keep practicing — related questions

  • After the declaration: char[] c = new char[100]; what is the value of c[50]?
  • int x = 12; while (x < 10) { x--; } System.out.print(x); What is the result?
  • String[] elements = { "for", "tea", "too" }; String first = (elements.length > 0) ? elements[0] : null; Wha...
  • public static void main(String[] args) { String str = "null"; if (str == null) { System.out.println("null")...
  • public class Yippee2 { static public void main(String [] yahoo) { for(int x = 1; x < yahoo.length; x++) { S...
  • NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(4); nf.setMinimumFractionDigits(2...
  • System.out.format("Pi is approximately %d.", Math.PI); What is the result?
  • int x = 12; while (x < 10) { x--; } System.out.print(x); What is the result?
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy