File tree Expand file tree Collapse file tree 7 files changed +33
-33
lines changed
Expand file tree Collapse file tree 7 files changed +33
-33
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- // arrays/IceCream .java
1+ // arrays/IceCreamFlavors .java
22// (c)2016 MindView LLC: see Copyright.txt
33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55// Returning arrays from methods
66import java .util .*;
77import static onjava .ArrayShow .*;
88
9- public class IceCream {
9+ public class IceCreamFlavors {
1010 private static SplittableRandom rand =
1111 new SplittableRandom (47 );
1212 static final String [] FLAVORS = {
Original file line number Diff line number Diff line change 1- // collections/CollectionMethods .java
1+ // collections/CollectionDifferences .java
22// (c)2016 MindView LLC: see Copyright.txt
33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55import onjava .*;
66
7- public class CollectionMethods {
7+ public class CollectionDifferences {
88 public static void main (String [] args ) {
99 CollectionMethodDifferences .main (args );
1010 }
Original file line number Diff line number Diff line change 1- // concurrent/CollectionToStream .java
1+ // concurrent/CollectionIntoStream .java
22// (c)2016 MindView LLC: see Copyright.txt
33// We make no guarantees that this code is fit for any purpose.
44// Visit http://OnJava8.com for more book information.
55import onjava .*;
66import java .util .*;
77import java .util .stream .*;
88
9- public class CollectionToStream {
9+ public class CollectionIntoStream {
1010 public static void main (String [] args ) {
1111 List <String > strings =
1212 Stream .generate (new Rand .String (5 ))
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ static void startMsg() {
1313 }
1414 @ Test
1515 void chatterTest () throws Exception {
16- // <* These need to be handed to an executor: *>
16+ // <* These must be handed to an executor: *>
1717 new ChatterServer ();
1818 new ChatterClient (InetAddress .getLocalHost ());
1919 // No exceptions means success
Original file line number Diff line number Diff line change 44// Visit http://OnJava8.com for more book information.
55import java .util .*;
66
7- /** The first On Java example program.
8- * Displays a String and today's date.
9- * @author Bruce Eckel
10- * @author www.MindviewInc.com
11- * @version 5.0
12- */
137public class HelloDate {
14- /** Entry point to class & application.
15- * @param args array of String arguments
16- * @throws exceptions No exceptions thrown
17- */
188 public static void main (String [] args ) {
199 System .out .println ("Hello, it's: " );
2010 System .out .println (new Date ());
2111 }
2212}
23- /* Output:
24- Hello, it's:
25- Wed Jul 27 10:50:45 MDT 2016
26- */
Original file line number Diff line number Diff line change 1+ // objects/HelloDateDoc.java
2+ // (c)2016 MindView LLC: see Copyright.txt
3+ // We make no guarantees that this code is fit for any purpose.
4+ // Visit http://OnJava8.com for more book information.
5+ import java .util .*;
6+
7+ /** The first On Java 8 example program.
8+ * Displays a String and today's date.
9+ * @author Bruce Eckel
10+ * @author www.MindviewInc.com
11+ * @version 5.0
12+ */
13+ public class HelloDateDoc {
14+ /** Entry point to class & application.
15+ * @param args array of String arguments
16+ * @throws exceptions No exceptions thrown
17+ */
18+ public static void main (String [] args ) {
19+ System .out .println ("Hello, it's: " );
20+ System .out .println (new Date ());
21+ }
22+ }
23+ /* Output:
24+ Hello, it's:
25+ Wed Jul 27 10:50:45 MDT 2016
26+ */
You can’t perform that action at this time.
0 commit comments