Given the code fragment: What is the result?
A.
68, 65, 69
B.
Compilation fails
C.
65, 68, 69
D.
65, 68, 65
E.
68, 65, 65
Explanation:
Given the code fragment: What is the result?
A.
68, 65, 69
B.
Compilation fails
C.
65, 68, 69
D.
65, 68, 65
E.
68, 65, 65
Explanation:
Please write question properly !!!!!!
Answer: E
Code question:
public class Main {
public static void main(String[] args) {
int iArray[] = {65, 68, 69};
iArray[2] = iArray[0];
iArray[0] = iArray[1];
iArray[1] = iArray[2];
for (int element : iArray) {
System.out.print(element + ” “);
}
}
}
Output:
68 65 65 BUILD SUCCESSFUL (total time: 0 seconds)