What is a try/ catch block?



What is a try/ catch block?..

Answer / Gopal Bajpai

In programming, a 'try/catch' block is used to handle exceptions (errors) in code. The 'try' section contains the code that might throw an exception, while the 'catch' section includes the code to handle the exception when it occurs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOAD Interview Questions

Why dynamic binding is used in object-oriented programming?

1 Answers  


Explain what is meant by polymorphism?

1 Answers   BPL,


What are the limitations of oops?

1 Answers  


What is meant by “abstract interface”?

1 Answers  


What is a functional interface? What is sam interface?

1 Answers  


What is the difference between a virtual method and an abstract method?

1 Answers  


What is the benefit of using inheritance?

1 Answers  


What is the need of multiple inheritance?

1 Answers  


What is the default access modifier for a class,struct and an interface declared directly with a namespace?

1 Answers  


What is serialization? How do we implement serialization actually?

1 Answers  


Is @functionalinterface annotation mandatory to define a functional interface? What is the use of @functionalinterface annotation? Why do we need functional interfaces in java?

1 Answers  


What do you mean by virtual function and virtual classes?

1 Answers   MCN Solutions,


Categories