Thursday, 30 June 2016

Java Tutorial : Java Exception handling (throw Exception)

Click here to watch in Youtube :

Click the below Image to Enlarge
Java Tutorial : Java Exception handling (throw Exception)
public class ThrowDemo

    public static void main(String[] args)

    public static int getNumber(String value)
        if (!value.matches("[0-9]+"))
            throw new ArithmeticException();
        return Integer.parseInt(value);

Exception in thread "main" java.lang.ArithmeticException
    at ThrowDemo.getNumber(
    at ThrowDemo.main(
Click the below link to download the code:

Github Link:

Bitbucket Link:

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

    Google+ Followers

    Google+ Badge