Error when creating array in java in IntelliJ: Error: Groovyc: unexpected token: 1

I just want to simply create an array:

int[] nums = {1, 2, 3};

But there is an error:

Error: Groovyc: unexpected token: 1

What should I do? Thank you!

import org.junit.Test;

import static org.junit.Assert.assertEquals;

class ArrayTest {

@Test

public void demonstrateArray(){

int[] nums = {1, 2, 3};

}

}...

Read More »

By: StackOverFlow - 6 days ago

Related Posts