Object Oriented Programming MCQs

Page No. 67

There can be a try block without catch block but vice versa is not possible.


aTrue

✓


bFalse

✖


cA & B

✖


d None of the above

✖


View Answer True

Which are the two blocks that are used to check error and handle the error?


aTry and catch

✓


b Trying and catching

✖


cDo and while

✖


dTryDo and Check

✖


View Answer Try and catch

What are two exception classes in hierarchy of java exceptions class?


aRuntime exceptions only

✖


bCompile time exceptions only

✖


c Runtime exceptions and other exceptions

✓


dOther exceptions

✖



Which is the universal exception handler class?


aObject

✖


b Math

✖


cErrors

✖


dExceptions

✓


View Answer Exceptions

If a file that needs to be opened is not found in the target location then _____________


a Exception will be produced

✓


bExceptions are not produced

✖


cException might get produced because of syntax

✖


dExceptions are not produced because of logic

✖



An exception may arise when _______________


aInput is fixed

✖


bInput is some constant value of program

✖


cInput given is invalid

✓


dInput is valid

✖



Why do we need to handle exceptions?


aTo prevent abnormal termination of program

✓


bTo encourage exception prone program

✖


cTo avoid syntax errors

✖


dTo save memory

✖



What is an exception?


aProblem arising during compile time

✖


bProblem arising during runtime

✓


cProblem in syntax

✖


dProblem in IDE

✖



Which condition among the following might result in memory exception?


aFalse if conditions

✖


b Nested if conditions that are all false

✖


cInfinite loops

✓


dLoop that runs exactly 99 times

✖


View Answer Infinite loops

Only the base class catch box can handle more than one exception in single block.


aTrue

✖


bFalse

✓


cA & B

✖


dNone of these

✖


View Answer False

Goto Page No.

Page 67 of 93

Alphabetical MCQs Categories
—

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"
—

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan