So I'm new to programming and am on track to learning Java. I use the Intellij IDE for most of my programming. I was following along on a tutorial which made use for-each loops. on attempting to execute this in my IDE it gave me the following error
'for-each loops are not supported at this language level'
Here is the codeblock I am trying to execute
public class test {
public static void main(String args[]) {
int omer[]={2,3,4,5,6,7};
int total=0;
for(int x:omer){
System.out.println(x);
}
}
}