"not a statement" error to array declaration
I'm getting a "not a statement" error pointing at the first square bracket in the following statement:
int final = new int[first.length + second.length];
("first" and "second" are other arrays)
In addition to the "not a statement" error, I'm getting seven other errors pointing at this statement alone, including " ; expected" and "[ expected". However, I think these are a direct result of the first error. Can anyone help me?
Also, I tested this line using an integer for the length instead of an expression, and it still didn't work.