From 6edaea090f76e9313649baa944c6c8ab1770f9d7 Mon Sep 17 00:00:00 2001 From: grantzou Date: Wed, 25 Oct 2017 14:09:14 +1300 Subject: [PATCH 1/3] Added a quiz example for autoboxing --- src/main/java/mycorejava/IntegerTricks.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main/java/mycorejava/IntegerTricks.java diff --git a/src/main/java/mycorejava/IntegerTricks.java b/src/main/java/mycorejava/IntegerTricks.java new file mode 100644 index 00000000..9d38c285 --- /dev/null +++ b/src/main/java/mycorejava/IntegerTricks.java @@ -0,0 +1,16 @@ +package mycorejava; + +import static java.lang.System.out; + +public class IntegerTricks { + + public static void main(String... args) { + int i1 = 1; + Integer io = new Integer(i1); + // line n1 + Integer ib1 = i1; + Integer ib2 = 1; + + out.println((i1 == io) + " " + (ib1 == ib2)); + } +} From 109e2edbea109f3068abf5cd283c8c13a2c06935 Mon Sep 17 00:00:00 2001 From: grantzou Date: Wed, 25 Oct 2017 14:13:03 +1300 Subject: [PATCH 2/3] Updated --- pom.xml | 49 +++++++++++++++++++++ src/main/java/mycorejava/IntegerTricks.java | 4 +- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 32ca0b3e..008f25f7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,3 +1,4 @@ +<<<<<<< current +======= + + + 4.0.0 + + manning + lambdasinaction + 1.0 + + + UTF-8 + + + + + junit + junit + 4.11 + + + junit + junit + 4.11 + + + junit + junit + 4.11 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + +>>>>>>> before discard \ No newline at end of file diff --git a/src/main/java/mycorejava/IntegerTricks.java b/src/main/java/mycorejava/IntegerTricks.java index 9d38c285..69cef7de 100644 --- a/src/main/java/mycorejava/IntegerTricks.java +++ b/src/main/java/mycorejava/IntegerTricks.java @@ -1,7 +1,5 @@ package mycorejava; -import static java.lang.System.out; - public class IntegerTricks { public static void main(String... args) { @@ -11,6 +9,6 @@ public static void main(String... args) { Integer ib1 = i1; Integer ib2 = 1; - out.println((i1 == io) + " " + (ib1 == ib2)); + System.out.println((i1 == io) + " " + (ib1 == ib2)); } } From 2cda76130d04bc6e1ebed9063db90c8c288224dc Mon Sep 17 00:00:00 2001 From: grantzou Date: Wed, 25 Oct 2017 14:20:34 +1300 Subject: [PATCH 3/3] Corrected the merge mistake --- pom.xml | 57 ++------------------------------------------------------- 1 file changed, 2 insertions(+), 55 deletions(-) diff --git a/pom.xml b/pom.xml index df89ce94..6bc3b3b8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,3 @@ -<<<<<<< current manning lambdasinaction 1.0 - + UTF-8 @@ -64,56 +63,4 @@ -<<<<<<< HEAD - -======= - - - 4.0.0 - - manning - lambdasinaction - 1.0 - - - UTF-8 - - - - - junit - junit - 4.11 - - - junit - junit - 4.11 - - - junit - junit - 4.11 - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.8 - 1.8 - - - - - ->>>>>>> before discard -======= ->>>>>>> 9c88efd6b0ac71b23c4f27131cdbd8215657a152 - \ No newline at end of file +