1. The following code will cause a(n) ___ exception. Please select the correct option "A, B, C, D, or E"
class Sample
{
public static void main(String[] args)
{
int x = 0;
int y = 10;
int z = y/x;
}
}
A. ArithmeticException
B. ArrayIndexOutOfBoundsException
C. StringIndexOutOfBoundsException
D. NullPointerException
E. ClassNotFoundException
A
Comments
Leave a comment