Hi there! alright I know this is probably the simplest thing in the world but I just can't get it. Populate a 1D array with even values from 1 to 12. What I have so far complies fine but doesn't run without errors. Thank you in avdanced:
import java.util.Scanner;
public class ArrayMultiplicationTable
{
public static void main(String[]args)
{
Scanner test = new Scanner(System.in);
int[] a = new int[6];
int e = 0;
for (int i = 0; i <=12; i++)
{
if(i%2==0)
{
e++;
a[e] = i;
}
}
System.out.println(a[e]);
}
}