Valid 1z1-808 Dumps shared by ExamDiscuss.com for Helping Passing 1z1-808 Exam! ExamDiscuss.com now offer the newest 1z1-808 exam dumps, the ExamDiscuss.com 1z1-808 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com 1z1-808 dumps with Test Engine here:
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?
Correct Answer: C
The following line does not compile: System.out.print("Found " + key + "at " + pos); The variable pos is undefined at this line, as its scope is only valid in the for loop. Any variables created inside of a loop are LOCAL TO THE LOOP.