Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 179
  • package exceptions; public class TestException2 { static ...

package exceptions; public class TestException2 { static double testException(int x, int y) { return (x/y); } public static void main(String[] args) { try { double p = testException(10,5); System.out.println("p = "+p); } catch(Exception e) { System.out.println("Exception happened "+e.getMessage()); return; } finally { System.out.println("In finally"); } } }

technology programming languages
  1. p = 2.0

  2. Compiler Error

  3. Exception

  4. p = 2.0 In finally


Show answer
Correct Option: D

Find more quizzes:

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