Questions · Page 4 of 4

MCQ

MCQ 1511 Mark
The instruction having possibilities to have errors are written in ………… .
  • try 
  • B
    catch 
  • C
    finally 
  • D
    throw
Answer
Correct option: A.
try 
(A) try
View full question & answer
MCQ 1521 Mark
If finally or catch are not given at the perfect location then ………. can happen.
  • A
    program get complied
  • program does not compile   
  • C
    program is terminated immediately.  
  • D
    program enters the loop
Answer
Correct option: B.
program does not compile   
(B) program does not compile
View full question & answer
MCQ 1531 Mark
Finally block does not care about ……… .
  • whether the exceptions are thrown or not by try block 
  • B
    inside catch block
  • C
    (A) and (B) both
  • D
    none of these
Answer
Correct option: A.
whether the exceptions are thrown or not by try block 
(A) whether the exceptions are thrown or not by try block
View full question & answer
MCQ 1541 Mark
Which of the following statements is true ?
  • A
    Exceptions are more serious than Errors.
  • B
    Errors are more serious than Exceptions.
  • C
    Errors and Exceptions are equally serious. 
  • Exceptions and Errors are the same thing.
Answer
Correct option: D.
Exceptions and Errors are the same thing.
(D) Exceptions and Errors are the same thing.
View full question & answer
MCQ 1551 Mark
Instruction handling one or more exceptions are included in …………. .
  • A
    try 
  • catch 
  • C
    finally 
  • D
    throw
Answer
Correct option: B.
catch 
(B) catch
View full question & answer
MCQ 1561 Mark
Instruction raising one or more exceptions are included in …………. .
  • try 
  • B
    catch 
  • C
    finally 
  • D
    throw
Answer
Correct option: A.
try 
(A) try
View full question & answer
MCQ 1571 Mark
…………… keyword is used to make a program using exception handling.
  • A
    try 
  • B
    catch 
  • C
    finally 
  • All of these
Answer
Correct option: D.
All of these
(D) All of these
View full question & answer
MCQ 1581 Mark
………… is the status of exception.
  • A
    Static situation 
  • Error situation 
  • C
    Dynamic situation 
  • D
    Status of Java programming
Answer
Correct option: B.
Error situation 
(B) Error situation
View full question & answer
MCQ 1601 Mark
Which of the following is least important to know if you want to be able to use a method to its full potential ?
  • A
    The method’s return type
  • B
    The type of arguments the method requires
  • The number of statements within the method  
  • D
    The type of Exceptions the method throws
Answer
Correct option: C.
The number of statements within the method  
(C) The number of statements within the method
View full question & answer
MCQ 1611 Mark
Which of the following elements is not included in try block ?
  • A
    The keyword try   
  • The keyword catch 
  • C
    The curly braces   
  • D
    Statements that might cause Exceptions
Answer
Correct option: B.
The keyword catch 
(B) The keyword catch
View full question & answer
MCQ 1621 Mark
………… package has corresponding classes to work with different exceptions.
  • A
    java.lang 
  • B
    java.io 
  • C
    java.hang 
  • (A) and (B) both
Answer
Correct option: D.
(A) and (B) both
(D) (A) and (B) both
View full question & answer
MCQ 1631 Mark
What is available for each type of exception in Java ?
  • A
    Public class 
  • Related exceptions class 
  • C
    Private class 
  • D
    All of these
Answer
Correct option: B.
Related exceptions class 
(B) Related exceptions class
View full question & answer
MCQ 1641 Mark
Exit code ……….. suggests that program is not executed successfully.
  • B
  • C
    – 1 
  • D
    2
Answer
Correct option: A.
(A) 0
View full question & answer
MCQ 1651 Mark
In computer science, …………. indicates whether the program is executed successfully or not.
  • A
    Exit code 
  • B
    Exit status 
  • both (A) and (B)
  • D
    None of these
Answer
Correct option: C.
both (A) and (B)
(C) (A) or (B)
View full question & answer
MCQ 1661 Mark
What is an exception ?
  • A
    Not to consider
  • Error during the compilation of program 
  • C
    All types of error situations  
  • D
    (B) and (C)
Answer
Correct option: B.
Error during the compilation of program 
(D) (B) and (C)
View full question & answer
MCQ 1671 Mark
Which of the following methods can throw an Exception ?
  • A
    Methods with throws clause 
  • B
    Methods with a catch block
  • Methods with a try block       
  • D
    Methods with finally block
Answer
Correct option: C.
Methods with a try block       
(C) Methods with a try block
View full question & answer
MCQ 1681 Mark
Which of the following is an advantage of using a try ….catch block ?
  • A
    Exceptional events are eliminated 
  • B
    Exceptional events are reduced
  • Exceptional events are integrated with regular events 
  • D
    Exceptional events are isolated from regular events
Answer
Correct option: C.
Exceptional events are integrated with regular events 
(C) Exceptional events are integrated with regular events
View full question & answer
MCQ 1691 Mark
Which of the following should be within a catch block ?
  • A
    Finally block
  • B
    Single statement that handles Exception 
  • Any number of statements to handle Exception  
  • D
    Throws keyword  
Answer
Correct option: C.
Any number of statements to handle Exception  
(C) Any number of statements to handle Exception
View full question & answer
MCQ 1701 Mark
Which of the following is a correct word for all Java Exceptions ?
  • A
    Errors 
  • Runtime Exceptions 
  • C
    Throwables   
  • D
    Omissions
Answer
Correct option: B.
Runtime Exceptions 
(B) Runtime Exceptions
View full question & answer
MCQ 1711 Mark
Which of the following refers to an error condition in object-oriented programming terminology ?
  • A
    Anomaly
  • B
    Abbreviation 
  • Exception 
  • D
    Deviation
Answer
Correct option: C.
Exception 
(C) Exception
View full question & answer
MCQ - Page 4 - COMPUTER STD 12 Science Questions - Vidyadip