File Handling in Object Oriented programming

Q. 1 What are Exceptions in Object Oriented Programming? What are the two types of exceptions?
Exceptions are those which occur during the program execution. It occur due to some fault in the program input data. Exceptions are classifieds into two different types:
a) Synchronous exception: The technique that is not suitable to handle the current class of data within the program are known as synchronous exception.

b) Asynchronous exception: The exceptions caused by events or faults unrelated to the program and beyond the control of program are called asynchronous exceptions.

Q. 2 What are the blocks used in the Exception Handling in Object Oriented Programming?
The exception-handling mechanism uses three blocks in Object Oriented Programming which are given below:
1) try block
2) throw block
3) catch block
The try-block must be followed immediately by catch-block. If an exception is thrown in the try-block.


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: