Friday 13 May 2016

Java Tutorial : Java what is an Exception


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

Click the below Image to Enlarge
Java Tutorial : Java what is an Exception 
ExceptionDemo.java
public class ExceptionDemo
{

    public static void main(String[] args)
    {
        int intValue = 50;
        System.out.println("intValue = " + intValue);

        double doubleValue = 45.9;
        System.out.println("doubleValue = " + doubleValue);

        String str = null;
        System.out.println("str = " + str.toString());

        float floatValue = 10.f;
        System.out.println("floatValue = " + floatValue);

        long longValue = 45000;
        System.out.println("longValue = " + longValue);

    }

}
Output
intValue = 50
doubleValue = 45.9
Exception in thread "main" java.lang.NullPointerException
    at ExceptionDemo.main(ExceptionDemo.java:14)
Click the below link to download the code:
https://sites.google.com/site/javaee4321/java/ExceptionDemo_What_is_an_Exception_App.zip?attredirects=0&d=1

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

Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/c539eeaf4c6ff331d8e2aa2333826ea70c999093/BasicJava/ExceptionDemo_What_is_an_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