• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Jvm thrown exceptions & programmatically thrown exceptions  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody please explain what is JVM thrown exception and Programatically thrown exception. this is a question from java.Inquisition mock exam.

Fill in the table to indicate which Exception and Error classes are typically thrown programatically and which by the JVM.

This is the answer.

ArrayIndexOutOfBoundsException by JVM

ClassCastException by JVM

IllegalArgumentException Programatically

IllegalStateException Programatically

NullPointerException by JVM

NumberFormatException Programatically

AssertionError Programatically

ExceptionInInitializerError by JVM

StackOverflowError by JVM

NoClassDefFoundError by JVM

both NumberFormatException and StackOverfowError are unchecked exceptions
then why one is thrown programatically and another by JVM.

It is confusing.Can any body explain, or refer book .

Thanks
lakshmi
 
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K &B book has explained ,on what basis they are categorrized.

IllegalState,...IllegalArgument,Numberformat..were decided by API developers that if argument entered is worng,exception should be thrown
so not thrown by JVM.
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!