• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Exception ..

 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could anyone list the following :

1. what are the checked execeptions?
2.what are the exceptions thrown by API developer?
3.what are the execeptions thrown by JVM?

i am really stuck on these...
sometimes getting confusion on execptions thrown by ApI are checked execption.

like NUmberFormatException...this is thrown by APi deveoper but it is subclass RuntimeException. which is thrown by Jvm.

i need a great help from ranchers..

Thanks in advance
Preetha
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SCJP study guide explains points 2 and 3.

A checked exception is one that must be caught in order to process that piece of code. For example, opening a connection to a website might throw a MalformedURLException if the URL is not properly formatted. If writing to a file is interrupted it might result in an IOException.
 
Preethi Dev
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can understand the explanation,i need list of them so that i can have a glance for my final preparation.

only three days to my exam

Thanks
Preetha
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One guy here in Brazil said:

"The exceptions launched by Developer/API are: IllegalArgumentException, IllegalStateException, NumberFormatException e AssertionError. Just don't forget about those ones that are launched by Developer/api, so everything else will be launch by the JVM"

Is it clear? I think those ones you have to burn in your mind
[ December 26, 2008: Message edited by: Djonatah Stiegler ]
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Preetha,

Checked exceptions are those that the compiler checks if are caught or thrown, this means, if some method throws an exception (defined on its method signature) and, in your code, you call that method, you always should catch it in or throw it, normally, any exception extending the Exception class (but not the RuntimeException class) is a checked exception.

As Djonatah said, those are mainly the developer's thrown exceptions, but you need to understand why, the exceptions thrown by developers are mainly caused by the code the developer made, either by a mistake or intentionally.

Hope this helps you.

Regards,
 
Let nothing stop you! Not even this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic