Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 204
  • Given the following code: public class OrtegorumFunction {...

Given the following code: public class OrtegorumFunction { public int computeDiscontinuous(int x) { int r = 1; r += X; if ((x > 4) && (x < 10)) { r += 2 * x; } else (x <= 4) { r += 3 * x; } else { r += 4 * x; } r += 5 * x; return r; } public static void main(String [] args) { OrtegorumFunction o = new OrtegorumFunction(); System.out.println("OF(11) is: " + o.computeDiscontinuous (11)); } } What is the result?

technology programming languages
  1. OF(11) is: 45

  2. OF(11) is: 56

  3. OF(11) is: 89

  4. OF(11) is: 111

  5. Compilation fails

  6. An exception is thrown at runtime.


Show answer
Correct Option: E

Find more quizzes:

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