You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bruce,
When I read your chapter on Concurrent Programming,In the section of Parallel Streams, For the isPrime() method in ParallelPrime.java, I tried to use (long) Math.sqrt(n) but the compiler gives an error,When I write the cast of (int) Math.sqrt(n) like this, it does not report an error ,I think this is a code error, because the parameter of the source code is int primetive type.
Please have a look.
My java version is "17.0.1" 2021-10-19 LTS
The text was updated successfully, but these errors were encountered:
Bruce,
When I read your chapter on Concurrent Programming,In the section of Parallel Streams, For the isPrime() method in ParallelPrime.java, I tried to use (long) Math.sqrt(n) but the compiler gives an error,When I write the cast of (int) Math.sqrt(n) like this, it does not report an error ,I think this is a code error, because the parameter of the source code is int primetive type.
Please have a look.
My java version is "17.0.1" 2021-10-19 LTS
The text was updated successfully, but these errors were encountered: