Instructions
- 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
- 2. Thoroughly review each solution before proceeding to ensure full understanding.
- 3. Final results will be available after submission to provide insights into areas for further improvement.
- 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
- 5. Once submitted, responses are final, so ensure you’re confident in your answers.
- 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.
All Problems
Question
Action
Which of the following keywords is used to handle exceptions in Java?
What will happen if an exception is not caught in a Java program?
Which block will always execute, whether an exception is thrown or not?
Which of the following is a checked exception?
What is the purpose of the throw keyword?
What will be the output of the following code?
Which exception is thrown when trying to access an array index that is out of bounds?
What is the correct way to declare a method that throws an exception?
What will happen if an exception is thrown in a try block but there is no corresponding catch block?
Which of the following will not compile?
Which of the following keywords is used to handle exceptions in Java?
What will happen if an exception is not caught in a Java program?
Which block will always execute, whether an exception is thrown or not?
Which of the following is a checked exception?
What is the purpose of the throw keyword?
What will be the output of the following code?
try { int[] arr = new int[5]; arr[10] = 100; } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Exception caught!"); }