FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Compile-Time vs Run-Time Exceptions in Java
NewsMachine Learning

Compile-Time vs Run-Time Exceptions in Java

via Dev.toVidya2h ago

What is a Compile-Time Exception? A compile-time exception (also called a checked exception) is an error that occurs before the program runs, during compilation. The Java compiler checks these errors and forces the programmer to handle them using try-catch or the throws keyword. If not handled, the program will not compile. Examples: --> IOException --> FileNotFoundException --> ClassNotFoundException import java.io.* ; public class Main { public static void main ( String [] args ) throws IOException { FileReader file = new FileReader ( "file.txt" ); } } What is a Run-Time Exception? A run-time exception (also called an unchecked exception) occurs while the program is running. These are not checked by the compiler because they usually happen due to logical errors in the code. Examples: --> ArithmeticException (divide by zero) --> NullPointerException --> ArrayIndexOutOfBoundsException public class Main { public static void main ( String [] args ) { int a = 10 / 0 ; // runtime exception

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

Caller ID app Truecaller hits 500 million monthly users
News

Caller ID app Truecaller hits 500 million monthly users

TechCrunch • 52m ago

Evercade’s new handheld has a larger screen and dual thumbsticks for 3D games
News

Evercade’s new handheld has a larger screen and dual thumbsticks for 3D games

The Verge • 59m ago

No Kings is taking back Americana
News

No Kings is taking back Americana

The Verge • 1h ago

Social gaming platform Rec Room, once valued at $3.5B, is shutting down
News

Social gaming platform Rec Room, once valued at $3.5B, is shutting down

TechCrunch • 1h ago

MLA+MOE based model and T5 comparison who wins?
News

MLA+MOE based model and T5 comparison who wins?

Medium Programming • 1h ago

Discover More Articles