Java For Android Tutorial #8: Arithmetic Exception / by zero
Code:
public class java {
public static void main(String[] str) {
try{
int i = 10/0;
}
catch(Exception e){
System.out.println("You are dividing the number by 0 in line A");
}
}
}
This blog will help students and professionals to learn Android in a great depth. You can find anything and everything related to Android studio development on this blog.
Comments
Post a Comment