-
Notifications
You must be signed in to change notification settings - Fork 188
Home
Safari Books Online, https://www.safaribooksonline.com/
Ken Kousen
[email protected]
@kenkousen
This document is for notes that come up during class. It’s also an easy way to share code and other materials.
-
HTML materials: http://www.kousenit.com/java/
-
GitHub repository: https://github.com/kousen/java_upgrade
-
Java 8 repository: https://github.com/kousen/java_8_recipes
-
Java 9+ repository: https://github.com/kousen/java_9_recipes
-
Java 11 documentation: https://docs.oracle.com/en/java/javase/11/
-
JShell User’s Guide: https://www.oracle.com/pls/topic/lookup?ctx=javase11&id=JSHEL-GUID-630F27C8-1195-4989-9F6B-2C51D46F52C8
-
JavaDocs: https://docs.oracle.com/en/java/javase/11/docs/api/overview-summary.html
You need Java 8 or above for this course. The repositories all have been tested under Java 11 (OpenJDK 11.0.1).
Java Is Still Free link (post on Medium):
- IntelliJ
-
Import the
build.gradle
file-
Use
Open
if an existing project is open, orImport
otherwise -
Navigate to the
build.gradle
file in the root of the project -
Accept all the defaults in the Import wizard
-
- Eclipse
-
Create an Eclipse project and import it
-
From a command prompt, execute
>gradlew cleanEclipse eclipse
-
Use File → Open → General → Existing Projects Into Workspace → navigate to the root of the project and select it
-
If you have a proxy to configure, create a file called gradle.properties
in either the project root directory or in ~/.gradle
(create that folder if necessary) and add:
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.https.nonProxyHosts=*.nonproxyrepos.com|localhost
Java Updates since 1.8:
Java 9 added Java Platform Module System (JPMS)
See Jigsaw docs at OpenJDK: http://openjdk.java.net/projects/jigsaw/
Java 10 added Local Variable Type Inference (LVTI)
See style guide at http://openjdk.java.net/projects/amber/LVTIstyle.html
(Some are on the outline, but some aren’t)
-
Optional
-
File I/O
-
Lazy streams
-
Deferred execution
-
The
peek
method -
Boxed streams
-
map
vsflatMap
-
Closure composition
-
The
reduce
method -
Exception handling
-
Partitioning and grouping
-
Downstream collectors
-
The
java.time
package
For parallelization to be beneficial:
-
Either a lot of data, or a process that takes a lot of time per element
-
Data that is easy to partition
-
The operations must be stateless and associative
Java streams by default use a ForkJoinPool
whose size matches the number of processors.
Note
|
Links are given for Safari Books Online when available. |
-
Modern Java Recipes, me, O’Reilly Media, https://www.safaribooksonline.com/library/view/modern-java-recipes/9781491973165/
-
Modern Java in Action, Urma, Fusco, and Mycroft, Manning, https://www.manning.com/books/modern-java-in-action
-
Java SE 8 for the Really Impatient, Horstmann, Addison-Wesley, https://learning.oreilly.com/library/view/java-se-8/9780133430202/
-
Functional Programming in Java, Subramaniam, Pragmatic Bookshelf, https://www.safaribooksonline.com/library/view/functional-programming-in/9781941222690/
-
Advanced Java Development, https://www.safaribooksonline.com/library/view/advanced-java-development/9781491960400/
-
Understanding Java 8 Generics, https://www.safaribooksonline.com/library/view/understanding-java-8/9781491978153/
-
Spring Framework Essentials, https://www.safaribooksonline.com/library/view/spring-framework-essentials/9781491942680/
-
Reactive Spring, https://www.safaribooksonline.com/library/view/reactive-spring/9781492025733/