title: How to convert Binary String to int array?
body: <p>Say I have an Integer, I convert it to binary string first. </p>
  
  <pre><code>            int symptomsM = 867;
              String symptomsBit = Integer.toBinaryString(symptomsM);
  </code></pre>
  
  <p>In this case, I would have symptomsBit as 1101100011 in binary. </p>
  
  <p>But how can I further convert it to Int Array that has the same content, such as<br>
   <code>symptomsBitArr[] = {1,1,0,1,1,0,0,0,1,1}</code>?</p>
  
  <p>Okay. Here is what I have tried. I know <code>symptomsBit.split(" ")</code> isn't correct. But do not know how to further improve it.</p>
  
  <pre><code>            symptomsM = 867;
              String symptomsBit = Integer.toBinaryString(symptomsM);
              String[] symptomsBitArr = symptomsBit.split(" ");
              System.out.println("symptomsBit: " + symptomsBit);
              System.out.println("symptomsBitArray: " + symptomsBitArr);
              int[] symptomsArray = new int[symptomsBitArr.length];
              for (int i = 0; i &lt; symptomsBitArr.length; i++) {
                   symptomsArray[i] = Integer.parseInt(symptomsBitArr[i]);
                   System.out.println("symptomsArray: " + symptomsArray);
                  }
  </code></pre>
  
  <p>I tried the way Idos suggested as below:</p>
  
  <pre><code>            symptomsM = 867;
              String symptomsBit = Integer.toBinaryString(symptomsM);
              String[] symptomsBitArr = symptomsBit.split(" ");
              System.out.println("symptomsBit: " + symptomsBit);
              System.out.println("symptomsBitArray: " + symptomsBitArr);
              int[] symptomsArray = new int[symptomsBitArr.length];
              for (int i = 0; i &lt; symptomsBitArr.length; i++) {
                   //symptomsArray[i] = Integer.parseInt(symptomsBitArr[i]);
                   symptomsArray[i] = Integer.parseInt(String.valueOf(symptomsBit.charAt(i)));
                   System.out.println("symptomsArray: " + symptomsArray);
                  }
  </code></pre>
  
  <p>But it still not works. Here is the output:</p>
  
  <pre><code>symptomsBitArray: [Ljava.lang.String; @2a139a55
  symptomsArray: [I@15db9742
  </code></pre>