@@ -0,0 +1,1078 @@
+package strings;%0A%0A/**%0A * String is immutable,%0A * - Any concatenation creates new object and returns its reference%0A * - Concatenation goes from LEFT to RIGHT%0A * - If both operands are numeric, + means numeric addition. If either one is String, + means concatenation%0A */%0Apublic class StringConcatenationRules %7B%0A    public static void main(String%5B%5D args) %7B%0A        // + concantenation%0A        String str = null;%0A        str += true;%0A        str += 5;%0A        str += %22 it %22;%0A        str += null;%0A        System.out.println(str); // nulltrue5 it null%0A%0A        // concantenation order: left to right%0A        String b = 10 + 5 + %22years old%22;    // 15years old%0A        String c = true + %22love%22;           // truelove%0A        String d = false + true + %22live%22;   // DOES NOT COMPILE, + can't be applied to booleans%0A%0A        // concat(String str)%0A        String a = %22globe%22;%0A        a.concat(%22 time%22);      // doesn't change a, but create new object%0A        System.out.println(a);  // still 'globe'%0A%0A        a.concat(5);            // DOES NOT COMPILE, takes only string parameter%0A    %7D%0A%7D%0A

String concatenation create new object. Concat. goes from LEFT to RIGHT