• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Please Help Me To Clear My Doubt?

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am really confused in order to determine whether particular exception is thrown by JVM or programatic exception.

How can we say that below specified exceptions are thrown by JVM?

StackOverFlowError
NullPointerException
ClassCastException
NoClassDefFoundError
ArrayIndexOutOfBoundsException

How can we say that below specified exceptions are thrown Programatically?


IllegalArgumentException
NumberFormatException
AssertionError
IlegalStateException

Can any one help me to know entire Exception classes hierarchy ?

Why start() in java.lang.Thread is not final?

Because if we override the start() of java.lang.Thread class in custom thread class, then if we call start() on that custom thread object then that custom thread object will not behave as a thread because start() in java.lang.Thread is being overriden in custom thread class.

I will be very thankful if some one clears my doubts with reasoning.

Thanks in advance.

Have a wonderful day ahead!

Regards,
Gopal
 
Ranch Hand
Posts: 210
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
exceptions thrown programmatically means, API developers might have written these exception to throw in certain situations.

like
IllegalArgumentException
assume that you have one method which takes certain range of values if range exceeds you may throw IllegalArgument exception.

NumberFormatException

we know when we get this exception

AssertionError

This is developed by API developers to be thrown when assertion is failed.

on the other hand exception thrown by JVM, are thrown by JVM at runtime they were not written by API developers(I am not sure about this).

I also have same query regarding start method.
[ September 29, 2008: Message edited by: ramesh maredu ]
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by V. Potluri:
Why start() in java.lang.Thread is not final?



See this link.
 
reply
    Bookmark Topic Watch Topic
  • New Topic