What is the result? Given: What is the result? Given: What is the result? A. null B. compilation fails C. Java.lang.NullPointerException D. 0 Show Hint ← Previous question Next question →
pojo int arr[]= null;; for(int ii:arr){ System.out.println(ii); } ==> Exception in thread “main” java.lang.NullPointerException ??==> C is correct Reply
int arr[]= null;;
for(int ii:arr){
System.out.println(ii);
}
==> Exception in thread “main” java.lang.NullPointerException ??==> C is correct
Yes, it must be C
c
The correct answer is a
You can use netbeans or another program to run the code!