title: Getting Index of a char from a char array
body: <p>Hello I need to get a char's index form a char array (By not using String). Yes I know it is unreasonable to do it while there is String but I need to know how to do it. So, I would appreciate that if you could show understanding.</p>
  
  <p>My char array holds: </p>
  
  <pre><code>" ABCDEF"
  </code></pre>
  
  <p>(It has a space at the beginning).</p>
  
  <p>When I try this: (I have already imported java.util.Arrays;)</p>
  
  <pre><code>Arrays.toString(charArr).indexOf(charNeeded);
  </code></pre>
  
  <p>It returns 16 because:</p>
  
  <pre><code>System.out.println(Arrays.toString(charArr));
  </code></pre>
  
  <p>Prints [ , A, B, C, D, E, F], it means the String that is being returned(index being searched in) is that. I need to search the index on " ABCDEF" can anyone help?</p>
  
  <p>Thanks in advance.</p>