Engineering Full Stack Apps with Java and JavaScript
Consider the following code:
public static void main(String[] args) { int[] values = { 10, 30, 50 }; for( int val : values ){ int x = 0; while(x<values.length){ System.out.println(x+" "+val); x++; } } }
How many times is 2 printed out?
Select 1 option
A. 0
B. 1
C. 2
D. 3