try to put any erroneous statement in a try block, there are as many exceptions available as arithmetic , arrayindexoutofbounds , etc., then do what you want to do in catch.
And to display the Forceclose dialog box, you do not need to do something when you do not catch it by default. The force close dialog box appears.
And why catch exceptions when you want to minimize the application?
source share