title: Java. Capitalizing, adding period
body: <p>Working on this rookie task and need help. </p>
  
  <p>This code must:
  Capitalize the first letter of the first word.
  Add a period (.) to the end of the sentence.
  Join the words into a complete string, with spaces.
  Do no other manipulation on the words.</p>
  
  <p>Here is an example of what this  code should do:
  INPUT "<em>i</em>", "<em>am</em>", "<em>super</em>", "<em>HERO</em>" 
  OUTPUT  I am super HERO.</p>
  
  <p>I thought about this in that case:</p>
  
  <pre><code>import java.util.StringJoiner;
  import java.lang.String;
  
  public class My {
      public static void main(String[] args) {
  
          String[] arr = new String[]{"i", "am", "super", "HERO"};
          StringJoiner sj = new StringJoiner(" ");
          //StringBuffer sb = new StringBuffer(".");
          for (String s : arr) {
              sj.add(s);
          }
          sj.append(".");
          sj.capitalize();
          System.out.println(sj);
  
  }
  </code></pre>
  
  <p>But catching error at "<em>append</em>" and "<em>capitalize</em>" - cannot resolve method. Pls, help.</p>