Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java throw keyword

class Main {
  public static void divideByZero() {
    throw new ArithmeticException("Trying to divide by 0");
  }

  public static void main(String[] args) {
    divideByZero();
  }
}
Source by sites.google.com #
 
PREVIOUS NEXT
Tagged: #Java #throw #keyword
ADD COMMENT
Topic
Name
2+5 =