OnJava8-Examples
OnJava8-Examples copied to clipboard
Code Examples for the book "On Java 8"
I used git command to clone this repository, and then execute `gradlew run` in cmd. Got this problem: ``` H:\java\onJava\Onjava8-examples>gradlew run FAILURE: Build failed with an exception. * What went...
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...
Bruce, When I read your chapter on Appendix: Understanding equals() and hashCode(), In the section of Understanding hashCode(), original text:The put() method places the keys and values in corresponding ArrayLists....
Bruce, When I read your chapter on Enumerations, In the section of enums in switch Statements, original text:the compiler will complain if you don’t have a default—even if you’ve covered...
Bruce, When I read your chapter on Enumerations, In the section of Using EnumSet Instead of Flags, original text:you’ll see that the of() method is overloaded both with varargs and...
Bruce, I am now a student. When I read your chapter on Strings, I found a problem: a problem about the "+" operator. In the section of Overloading + vs.StringBuilder:...
Hello.in chapter 5.2 ,the word : Boolean-expression,I think it should be "boolean-expression" or "BooleanExpression". The "Boolean-expression" mixes camel case and kebab case . my book is chiness verssion and the...
Bruce, Sorry this isn't a PR. I got bogged down trying to upgrade the OnJava8 gradle version to 7.4 to get Java 17 compatibility and ultimately threw away what I...
# Gradle output with --stacktrace ``` FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':strings:BetterRead'. > Process 'command 'C:\Program Files\Eclipse Adoptium\jdk-11.0.13.8-hotspot\bin\java.exe'' finished with non-zero...
I'm confused about the setup. in Readme, it states that we should use JDK 8, I installed JDK 8 (Corretto), but in the repo, it clearly used some features introduced...