Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 137
  • What will be the output following code with executed with com...

What will be the output following code with executed with command ? >java Main 2 public class Main { private static int a = 2; private static int b; public static void main(String[] args) { b = Integer.parseInt(args[0]); a = a + b; System.out.println("a=" + a); System.out.println("b=" + b); } static{ a = 0; } }

technology programming languages
  1. a=4; b=2;

  2. a=2; b=4;

  3. a=0; b=2; *

  4. Run time error


Show answer
Correct Option: C

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy