0

I am getting the error for the following line:

var playerAmt = player.stream().filter(Card::isTrue).count();

Error:

var cannot be resolved to a type

I am not writing the whole code here because it's quite long and I think it won't help much. The same error exists at different places in the code.

I am using Eclipse IDE. I also searched this on the internet but didn't help.

Ricky
  • 79
  • 1
  • 8

1 Answers1

1

If you are using Java 10+, change the compiler level on Eclipse: Project Properties > Java Compiler > Compiler compliance level: 10(+).

Bruno
  • 11
  • 1