Java

Program to Handle any Three In-built Exceptions

By June 4, 2016 November 9th, 2016 27 Comments

/**** Java Program to Handle any Three In-built Exceptions ****/

class checkExcept
{
public void add()
{
try
{
int y = 20,z = 0;
int x = y/z;
System.out.println(x);
System.out.println(“working”);
}
catch(ArithmeticException a)
{
System.out.println(“error”);
}
catch(SecurityException a2)
{
System.out.println(“error”);
}
catch(ArrayStoreException a1)
{ }
catch(Exception x)
{
System.out.println(x.getMessage());
}
finally
{
System.out.println(“finaly”);
}
}

public static void main(String a[])
{
checkExcept c = new checkExcept();
c.add();
}
}





Output:

Screenshot (303)

27 Comments

  • yeezy shoes says:

    I intended to put you a very little observation just to thank you over again regarding the great opinions you have featured at this time. It is surprisingly open-handed with you to offer without restraint what exactly a number of people would have sold for an e book in order to make some dough for themselves, certainly considering that you could have tried it if you considered necessary. These tips likewise served to be a easy way to be aware that other people have a similar passion really like mine to learn way more regarding this matter. I know there are thousands of more pleasant situations up front for those who browse through your website.

  • adidas neo says:

    Oh my goodness! an incredible article dude. Thank you Nevertheless I am experiencing problem with ur rss . Don抰 know why Unable to subscribe to it. Is there anybody getting identical rss downside? Anybody who knows kindly respond. Thnkx

  • I’m also commenting to make you understand what a magnificent discovery our princess obtained reading your webblog. She even learned a good number of issues, which include how it is like to possess a very effective teaching mood to have the rest just fully understand some complex things. You truly exceeded readers’ expected results. I appreciate you for supplying those precious, trustworthy, edifying and as well as unique tips on your topic to Mary.

  • The subsequent time I read a blog, I hope that it doesnt disappoint me as a lot as this one. I mean, I do know it was my option to read, but I actually thought youd have something fascinating to say. All I hear is a bunch of whining about one thing that you possibly can repair should you werent too busy searching for attention.

  • WONDERFUL Post.thanks for share..more wait .. ?

  • roshe run says:

    There are some fascinating closing dates in this article but I don抰 know if I see all of them heart to heart. There may be some validity but I will take maintain opinion till I look into it further. Good article , thanks and we want more! Added to FeedBurner as effectively

  • yeezy boost says:

    I not to mention my friends came following the nice secrets and techniques from your web blog while at once I had a terrible suspicion I never thanked the blog owner for those secrets. Most of the women were definitely totally very interested to study them and have in effect actually been having fun with those things. Appreciate your really being very accommodating and also for going for some important useful guides most people are really desperate to learn about. Our own sincere regret for not expressing appreciation to you sooner.

  • An fascinating dialogue is value comment. I think that it’s best to write extra on this topic, it may not be a taboo subject however generally individuals are not sufficient to talk on such topics. To the next. Cheers

  • The next time I read a weblog, I hope that it doesnt disappoint me as much as this one. I imply, I know it was my option to learn, but I really thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about something that you could possibly repair for those who werent too busy on the lookout for attention.

  • There are definitely a lot of particulars like that to take into consideration. That may be a nice level to convey up. I provide the ideas above as general inspiration however clearly there are questions like the one you carry up the place an important thing will probably be working in sincere good faith. I don?t know if best practices have emerged around issues like that, however I am certain that your job is clearly recognized as a good game. Both girls and boys really feel the impact of just a moment抯 pleasure, for the remainder of their lives.

  • It抯 arduous to search out knowledgeable folks on this matter, however you sound like you know what you抮e speaking about! Thanks

  • An attention-grabbing dialogue is worth comment. I feel that it is best to write extra on this subject, it won’t be a taboo topic but generally individuals are not sufficient to speak on such topics. To the next. Cheers

  • This web site is known as a stroll-by means of for all the info you wanted about this and didn抰 know who to ask. Glimpse here, and also you抣l definitely discover it.

  • I just want to say I am just very new to blogging and site-building and truly savored this website. More than likely I’m want to bookmark your website . You definitely have perfect articles. Thanks a bunch for sharing your website.

  • There are certainly plenty of details like that to take into consideration. That may be a nice level to convey up. I supply the thoughts above as basic inspiration but clearly there are questions like the one you carry up where crucial thing will be working in sincere good faith. I don?t know if greatest practices have emerged round issues like that, but I am sure that your job is clearly recognized as a fair game. Both girls and boys feel the affect of only a second抯 pleasure, for the remainder of their lives.

  • I discovered your weblog web site on google and verify a couple of of your early posts. Continue to keep up the very good operate. I simply additional up your RSS feed to my MSN News Reader. Seeking forward to studying extra from you in a while!?

  • This web site is known as a stroll-by for the entire data you wished about this and didn抰 know who to ask. Glimpse here, and also you抣l undoubtedly discover it.

  • you will have an excellent weblog right here! would you wish to make some invite posts on my weblog?

  • The next time I learn a weblog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my option to learn, but I actually thought youd have something fascinating to say. All I hear is a bunch of whining about something that you would fix if you werent too busy looking for attention.

  • I and also my guys were looking at the excellent information and facts located on your web blog and so instantly I had a horrible feeling I never thanked the website owner for them. All of the women appeared to be as a consequence joyful to study them and have now sincerely been tapping into them. I appreciate you for indeed being really helpful and for settling on some perfect subject matter most people are really desirous to know about. My very own honest regret for not saying thanks to you sooner.

  • After I originally commented I clicked the -Notify me when new comments are added- checkbox and now every time a remark is added I get four emails with the same comment. Is there any way you may remove me from that service? Thanks!

  • The following time I read a blog, I hope that it doesnt disappoint me as much as this one. I imply, I know it was my option to learn, however I really thought youd have something attention-grabbing to say. All I hear is a bunch of whining about something that you may fix in case you werent too busy looking for attention.

  • After I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a remark is added I get four emails with the identical comment. Is there any approach you can remove me from that service? Thanks!

  • yeezy boost says:

    I truly wanted to compose a brief note so as to appreciate you for all the lovely ways you are giving out here. My incredibly long internet look up has now been paid with incredibly good know-how to share with my company. I would express that most of us website visitors are very much blessed to live in a decent community with so many perfect people with good pointers. I feel pretty blessed to have discovered the website page and look forward to tons of more amazing minutes reading here. Thank you again for everything.

  • Spot on with this write-up, I truly assume this web site wants far more consideration. I抣l probably be again to learn way more, thanks for that info.

  • nike zoom says:

    Youre so cool! I dont suppose Ive learn anything like this before. So good to search out anyone with some authentic ideas on this subject. realy thank you for beginning this up. this website is one thing that’s needed on the web, somebody with slightly originality. useful job for bringing one thing new to the internet!

  • yeezy boost says:

    Thank you for your entire effort on this website. My aunt enjoys setting aside time for internet research and it’s really easy to see why. I notice all regarding the lively method you present reliable guides through your web site and foster participation from some others on the area of interest so our own princess is without a doubt starting to learn a whole lot. Enjoy the rest of the new year. You are carrying out a wonderful job.

Leave a Reply to yeezy boost Cancel Reply