Java - Types of Errors , compile time , run time

There are several types of error, each with its own method of detection and repair. Broadly application errors are divided into compile time errors and run time errors.  

Compile Time Errors

Syntax errors are errors in grammar and punctuation such as mismatched quotes, missed commas or case-sensitivity issues.

Code Missing error are errors resulting because appropriate code , classes , jars have not been included. For example - classNotFound etc.
 

RunTime Errors

Runtime errors only show up as the program is executed. Example of run time errors are exceptions like nullPointerException , IllegalArgumentException.

Other than these 2 broad classifications , we have -

Logic errors are basic errors in the programmer's algorithms or procedural errors. Diagnosis only comes when incorrect results occur and solution requires mapping out the flow for test cases. An example is wrong scoping of a variable. Dynamic testing is required. 

Threading errors can occur when multiple threads are programmed. Common issues are access, deadlock, data race and synchronization. These types of errors are very difficult to trace.

200 Core Java Interview Questions and Answers


Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus