Given code of Test.java file:
1. package com.udayan.ocp;
2.
3. public class Test {
4. private static void div(int i, int j) {
5. try {
6. System.out.println(i / j);
7. } catch(ArithmeticException e) {
8. throw (RuntimeException)e;
9. }
10. }
11. public static void main(String[] args) {
12. try {
13. div(5, 0);
14. } catch(ArithmeticException e) {
15. System.out.println("AE");
16. } catch(RuntimeException e) {
17. System.out.println("RE");
18. }
19. }
20. }
What will be the result of compiling and executing Test class?
Given:

Given code of Test.java file:
1. package com.udayan.ocp;
2.
3. import java.util.ArrayDeque;
4. import java.util.Deque;
5.
6. public class Test {
7. public static void main(String[] args) {
8. Deque
9. deque.push(new Boolean("abc"));
10. deque.push(new Boolean("tRuE"));
11. deque.push(new Boolean("FALSE"));
12. deque.push(true);
13. System.out.println(deque.pop() + ":" + deque.peek() + ":" + deque.size());
14. }
15. }
What will be the result of compiling and executing Test class?
© Copyrights Oracledumps 2025. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (Oracledumps). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the Oracledumps.