What are the values of each element in intArr after this code has executed?

Given the following code:

What are the values of each element in intArr after this code has executed?
A. 15, 60, 45, 90, 75
B. 15, 90, 45, 90, 75
C. 15, 30, 75, 60, 90
D. 15, 30, 90, 60, 90
E. 15, 4, 45, 60, 90

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “What are the values of each element in intArr after this code has executed?

  1. public static void main(String[] args) {
    int intArr[] = {15,30,45,60,75};
    intArr[2]=intArr[4];
    intArr[4]=90;
    for(int n:intArr){
    System.out.print(n);
    }
    }
    result 15 30 75 60 90

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.