Runtime error happens during the execution time of the program.
One example of runtime errors is division by zero.
It happens when the divisor is zero for integer divisions.
The following program would cause a runtime error.
public class Main { public static void main(String[] args) { System.out.println(1 / 0);/*from ww w .j a va 2s.c om*/ } }