ElidedSemicolonAndRightBrace expected

Viewed 22440

I have the following code ("codes" is an array variable):

Arrays.asList(codes)
        .stream()
        .filter(code -> code.hasCountries())
        .sorted()
        .toArray()
        );

The compiler gives me the following error:

Syntax error on token ")", ElidedSemicolonAndRightBrace expected

What's wrong here?

1 Answers
Related