+ 2
Java exception
why my code isnt catching exception public class Program { public static void main(String[] args) { try{ String x=5; System.out.println(x); } catch(Exception e){ System.out.println("Errir"); } } }
5 odpowiedzi
+ 1
Yeah, an error usually means an unexpected (mis)behavior of an application. An exception is either part of error handling or error prevention.
+ 2
oh ok thanks for the answer
+ 1
This bug leads to a compiler error, which prevents from building any executable software.
+ 1
are error and exception different things?
+ 1
You're welcome