Trying to convert a char array to integer array in Java with this code
<p>I'm trying to convert an array of characters into integers, so I can get the ascii code, but the code I have doesn't seem to be working.</p>

<pre><code>import javax.swing.*;
import java.text.*;
import java.util.*;
import java.lang.*;

public class Encrypt {


public static void main(String[] args) {

String phrase = JOptionPane.showInputDialog(null, "Enter phrase to be messed with ");
char[] charArray = phrase.toCharArray();

for (int count = 0; count &lt; charArray.length; count++) {
int digit = ((int)charArray[count]);

System.out.println(digit[count]);

}




}
</code></pre>
