Below is my code :
public class prg34 {
public static void main(String[] args) {
int a=6;
for(int i=0;i<10;i++){
System.out.println(a/i);
}
}
}
Exception:
Exception in thread "main" java.lang.ArithmeticException: / by zero at run.prg34.main(prg34.java:8)
How to solve above Arithmetic Exception in java ?