Friday, 17 June 2016

Java Tutorial : Java Runtime Exception or unchecked exception


Click here to watch in Youtube :
https://www.youtube.com/watch?v=OOYNpNS-Ejo&list=UUhwKlOVR041tngjerWxVccw

Click the below Image to Enlarge
Java Tutorial : Java Runtime Exception or unchecked exception 
RuntimeExceptionDemo.java
public class RuntimeExceptionDemo
{
    public static void main(String[] args)
    {
        int a = 10;
        int b = 0;

        // Divide by zero, will lead to exception
        int result = a / b;
    }

}
Output
Exception in thread "main" java.lang.ArithmeticException: / by zero
    at RuntimeExceptionDemo.main(RuntimeExceptionDemo.java:9)

Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/ExceptionDemo_Runtime_Exception_App.zip?attredirects=0&d=1

Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/ExceptionDemo_Runtime_Exception_App

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/2edf29d684ae5278e3d99171112d04090b378c86/BasicJava/ExceptionDemo_Runtime_Exception_App/?at=master

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment