ExamVeda
Login
Home
31
The class at the top of exception class hierarchy is .................
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
32
In which of the following package Exception class exist?
Discuss
Answer & Solution
Answer: Option D
Solution:
The Exception class is part of the java.lang package.

java.lang is one of the core packages in Java, automatically imported into every Java program.

The Exception class, being part of this package, is the base class for all exceptions in Java. It handles various types of runtime errors, allowing developers to manage error conditions gracefully.
33
Exception generated in try block is caught in ........... block.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
34
Which keyword is used to explicitly throw an exception?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
35
Which exception is thrown when divide by zero statement executes?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
36
Which keyword is used to specify the exception thrown by method?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
37
Which of the following blocks execute compulsorily whether exception is caught or not.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
What happen in case of multiple catch blocks?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
39
Which exception is thrown when an array element is accessed beyond the array size?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
40
What is the output of the following program code?
public class Test{
        public static void main(String args[]){
                try{
                        int i;
                        return;
                }
                catch(Exception e){
                        System.out.print("inCatchBlock");
                }
                finally{
                        System.out.println("inFinallyBlock");
                }
        }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board