employer cover photo
employer logo
employer logo

Tudip Technologies

Is this your company?

Tudip Technologies interview question

Can we write try catch block in constructor? Link list ,stack ,queue, virtual function ,pointers

Interview Answer

Anonymous

Nov 15, 2019

Like any method can throw exception, a constructor can also throw a exception since it is also a method which is invoked when a object is created. yes we can write a try catchblock within a constructor same as we can write in inside a method.