title: How to take an array of strings and get the ASCII value of each character in EACH string in Java?
body: <p>So i have an array of strings. Each index contains a string like "abc" "fnsb" "feros". I want to pass in this array of strings through a for loop that can get each character's ASCII value of ALL the strings listed above and possibly store each string's character's ASCII value in another array. For example, if my array of strings has </p>
  
  <pre><code>mystrings[0] = hi
  mystrings[1] = hello
  mystrings[2] = farewell
  </code></pre>
  
  <p>I want it to take the ASCII values of "h" and "i" and store it in an <code>newarray[0]</code>, then take the ASCII values of "h","e","l","l","o" and store it into <code>newarray[1]</code>, and ETC.</p>
  
  <p>Note: Above is a bunch of pseudocode. Here is what I actually have:</p>
  
  <pre><code>String[] mystrings= new String[100];
  double [] newarray = new double[100];
          for (int x=0; x&lt;100; x++){
              char character = mystrings[x].charAt(x);
              int ascii = (int) character;
              newarray[x] = ascii;
              System.out.println(newarray[x]);
          }
  </code></pre>
  
  <p>Another note: There are indeed multiple strings stored in each index of the mystrings array. It's just in another part of my code that I don't want to share. So please assume that the "mystrings" array is properly filled with various strings. Thank you!</p>