diff --git a/java.html.markdown b/java.html.markdown index 20156365..fc7383d8 100644 --- a/java.html.markdown +++ b/java.html.markdown @@ -126,8 +126,8 @@ public class LearnJava { // = = = int barInt1, barInt2, barInt3; barInt1 = barInt2 = barInt3 = 1; - // Shorthand for multiple declarations - int barInt4 = 1, barInt5 = 2; + // Shorthand for multiple declarations + int barInt4 = 1, barInt5 = 2; /* @@ -310,8 +310,8 @@ public class LearnJava { /////////////////////////////////////// System.out.println("\n->Operators"); - int i1 = 1, i2 = 2; - + int i1 = 1, i2 = 2; + // Arithmetic is straightforward System.out.println("1+2 = " + (i1 + i2)); // => 3 System.out.println("2-1 = " + (i2 - i1)); // => 1 @@ -543,7 +543,7 @@ public class LearnJava { // is called when the anonymous inner class is created. // This does not only work for Collections, it works for all // non-final classes. - + // Another option was to initialize the Collection from an array, // using Arrays.asList() method: @@ -926,7 +926,7 @@ import java.security.SecureRandom; public class Lambdas { public static void main(String[] args) { // Lambda declaration syntax: - // -> + // -> // We will use this hashmap in our examples below. Map planets = new HashMap<>();