feel like im on ther home run of this tutorial. not quite done yet but thank you so much for this content. its crazy that in this world you can learn to code without even player a doller.... thanks telusko. you're a legend.
hello sir, on executing line 9 itself, error occurs and the execution enters the catch block rite ? Line number 10 won't be executed at all and hence the 'throw' code. Am i getting it rite ?
Nope buddy, If you'll re-watch the video, he explained that he doesn't want the value of J to be zero( which comes as an output when 18 is divided by 20). Since the above division operation is not an exception, catch block is not called, that's why we are using the keyword "Throw" to make this operation an exception and catched by catch block. The code in the video is totally correct 🙂