@@ -0,0 +1,2616 @@
+%0Aimport java.util.ArrayList;%0A%0Apublic class StarTree %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A        String completed_tree = %22incomplete%22;%0A%0A        completed_tree = build_tree(3);%0A        System.out.println(completed_tree);%0A%0A    %7D%0A%0A    private static String build_tree(Integer levels) %7B%0A%0A        String current_line = %22%22;%0A        ArrayList%3CString%3E full_tree;%0A        String completed_tree = %22%22;%0A%0A        String spaces = %22%22;%0A        String stars = %22%22;%0A        Integer number_of_spaces_on_this_line = 0;%0A        Integer number_of_stars_on_this_line = 0;%0A%0A        full_tree = new ArrayList%3CString%3E();%0A%0A        for (Integer each_level = 1; each_level %3C= levels; each_level++) %7B%0A%0A            for (Integer current_tier = 0; current_tier %3C= each_level; current_tier++) %7B%0A%0A                number_of_spaces_on_this_line = levels - current_tier;%0A%0A                number_of_stars_on_this_line = (current_tier * 2) + 1;%0A%0A                // number_of_stars_on_this_line = ((levels - number_of_spaces_on_this_line) * 2) + 1;%0A%0A                // Reference:%0A                // http://stackoverflow.com/a/16812721%0A                // This one is complicated to explain at first.%0A                // This puts a new String object into current_line.%0A                // The first parameter of this String object is%0A                // whatever the String contains, such as:%0A                //     new String(%22Hello%22)%0A                // So, this String contains an array full of chars.%0A                // This array full of chars is initialized with a%0A                // number; this number will populate the char array%0A                // with a number of null characters (ie, %22%5C0%22).%0A                // These null characters are then all replaced with%0A                // spaces (ie, %22 %22) using the String class's replace%0A                // method. ... I chose this because I wanted to%0A                // understand why String formatting wasn't easy by%0A                // default. It sort of is; it just isn't obvious.%0A                spaces = new String(%0A                        new char%5Bnumber_of_spaces_on_this_line%5D%0A                    ).replace(%22%5C0%22, %22 %22);%0A%0A                stars = new String(%0A                        new char%5Bnumber_of_stars_on_this_line%5D%0A                    ).replace(%22%5C0%22, %22*%22);%0A%0A                current_line = spaces + stars;%0A%0A                full_tree.add(current_line);%0A            %7D%0A        %7D%0A%0A        // Reference:%0A        // http://stackoverflow.com/a/599181%0A        for (String each_row : full_tree) %7B%0A            completed_tree += %22%5Cn%22 + each_row;%0A        %7D%0A%0A        return completed_tree;%0A%0A    %7D%0A%0A%7D%0A

Add StarTree.java