Given the code fragment:
Which code fragment, when inserted at line 9, enables the code to print true?
Which two statements are true? (Choose two.)
Given this code for a Planet object:
What is the output?
What will be the result of compiling and executing Test class?1. //Test.java2. package com.udayan.oca;3. 4. import java.io.FileNotFoundException;5. 6. public class Test {7. public static void main(String[] args) {8. try {9. System.out.println(1);10. } catch (NullPointerException ex) {11. System.out.println("ONE");12. } catch (FileNotFoundException ex) {13. System.out.println("TWO");14. }15. System.out.println("THREE");16. }17. }
Which of the following is a checked Exception?
© Copyrights FreePDFQuestions 2026. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (FreePDFQuestions). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the FreePDFQuestions.