title: Java . Save console input with loops to array lists and convert it to a string array
body: <p>This is my try to save console input into a array list and convert it to a string Array.</p>
  
  <p>There are no syntax errors but it wont work how it should do.
  For proposal and tips I would be very grateful.</p>
  
  <pre><code>import java.util.Scanner;
  import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  import java.util.List; 
  import java.util.ArrayList;
  
  public class LoeffelSprache
  {
      public LoeffelSprache()
      {
      }
      public void translation ()
      {
          System.out.println("Insert your Text here");
          Scanner sc = new Scanner(System.in);
          String s= sc.next(); 
  
          List&lt;String&gt; list1 = new ArrayList&lt;String&gt;();
  
          while (sc.hasNext()) {
              sc.next();   
              list1.add(s);
          }
          String [] words = new String [list1.size()];
          words=list1.toArray(words);
      }
  }
  </code></pre>