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.
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 < charArray.length; count++) {
int digit = ((int)charArray[count]);
System.out.println(digit[count]);
}
}