Hi there, I am fairly new to Java and i need your help! I do not understand what is going on, im trying to make an array and on one of the lines it says " 'i' cannot be resolved in the variable ".
Here is my code:
public class Arrays { public static void main(String[] args) { int value = 7; int[] values; values = new int [3]; System.out.println(values[0]); values[0] = 10; values[1] = 20; values[2] = 30; System.out.println(values[0]); System.out.println(values[1]); System.out.println(values[2]); for(int i = 0; i < values.length; i++); { System.out.println(values[i]); } } }
im getting the error with the i in this line of code System.out.println(values[i]);
Thanks in advance!
also i am using a program called Eclipse - Kepler