title: Add Something to Char Array at Specific Spot (Java)
body: <p>I am tasked with taking a user sentence then separating it at the upper case letters as well as making those letters lower case after adding a <code>&quot; &quot;</code>.<br />
  I want to add a space add that position so that if user inputs <code>&quot;HappyDaysToCome&quot;</code> will output <code>&quot;Happy days to come&quot;</code>.</p>
  <h3>Current code</h3>
  <pre><code>  public static void main(String[] args)
    {
      Scanner s = new Scanner(System.in);
      System.out.println(&quot;Please enter a sentence&quot;);
      String sentenceString = s.nextLine();
      char[] sentenceArray = sentenceString.toCharArray();
      for(int i = 0; i &lt; sentenceArray.length; i++)
      {
          if(i!=0 &amp;&amp; Character.isUpperCase(sentenceArray[i]))
          {
              Character.toLowerCase(sentenceArray[i]); 
              sentenceArray.add(i, ' ');    
          }
  
      }
      System.out.println(sentenceArray)
      s.close();
    }
  }
  </code></pre>