javaの実行で、「";"がありません」とエラーが出たのに、5行目と言われたのでそのエラー行を見に行くと ; の文字はちゃんと付いていた。その時の本当の原因とは?【備忘録】 ...
Fixed the comment to say that 0 is the issue, not a negative number. nextInt doesn't allow 0 to be passed, and since the filtered stream above yields 0 elements, this seems to cause the crash.