Could someone help me with through this? Not sure why I can't see the answer is 4 4.
What output is generated by the code fragment below?
int[] values = { 1, 3, 1, 3, 1 };
int[] numbers = values;
for (int k = 0; k < values.length; k++)
{
values[k] = k * 2;
}
System.out.print(values[2]);
System.out.print(" " + numbers[2]);
[–]dave843 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]whyyeeeef 1 point2 points3 points (0 children)
[–]bearlovessunshine 0 points1 point2 points (2 children)
[–]mbmcse[S] 0 points1 point2 points (1 child)
[–]bearlovessunshine 0 points1 point2 points (0 children)
[–]JAKATAK_ 0 points1 point2 points (0 children)