title: java array list
body: <p>its been awhile since i used java the last time and am trying to brush up on couple of things.</p>
  
  <pre><code>import java.util.*;
  
  public class bitStrings {
      public static void main(String [] args){
  
          Scanner inputBitString = new Scanner(System.in);        
  
          //input.
          String binArray;
  
          ArrayList&lt;String&gt; myArr = new ArrayList&lt;String&gt;();
  
          while(inputBitString.hasNext()){
  
              binArray=inputBitString.next();         
              myArr.add(binArray);
              System.out.println(myArr);      
  
              for(int i=0;i&lt;myArr.size();i++){
                  if(myArr(i)=="1") myArr(i)=="10";
                  else myArr(i)=="01"
              }
          }
  
      }
  
  }
  </code></pre>
  
  <p>So I want to store the input in an array from the user's keyboard input. so if the user types "1010", the for loop will go through the array and replaces the "1" with "10" and "0" with "01".
  so the resulting output will be "10011001"</p>
  
  <p>Thanks</p>