1Z0-808 Web TestEngine demo

Exit VCEDump 1Z0-808 Java SE 8 Programmer I
Question 6 of 58
0% complete
Q6 Single choice

Given:
public class TestLoop {

public static void main(String[] args) {

int array[] = {0, 1, 2, 3, 4};

int key = 3;

for (int pos = 0; pos < array.length; ++pos) {

if (array[pos] == key) {

break;

}

}

System.out.print("Found " + key + "at " + pos);

}

}

What is the result?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in