Correct Answer - Option 3 : X.length() should be X.length
In java, for an integer variable X to find the length of the array we should use X.length instead of x.length().
Corect code:
int [] X = new int [10]; // x is an integer array
for (int P = 0; P < X.length; P++) // so, X.length should be used and P < X.length
X [P] = 5;
Important Point:
String X;
X.length() is used for String data type