GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:   What are the different kinds of exceptions? How do you catch a Runtime exception



July 07, 2005 04:49:42 #2
 Arundathi   Member Since: Visitor    Total Comments: N/A 

RE: What are the different kinds of exceptions? How do you catch a Runtime exception
 
1.Checked Exceptions  
Environmental error that cannot necessarily be detected by testing; e.g. disk full, broken socket, database unavailable, etc.  
2.Errors  
Virtual machine error: class not found, out of memory, no such method, illegal access to private field, etc.  
3.Runtime Exceptions  
Programming errors that should be detected in testing: index out of bounds, null pointer, illegal argument, etc.  
 
Checked exceptions must be handled at compile time. Runtime exceptions do not need to be. Errors often cannot be 
     

 

Back To Question