import
javax.swing.JOptionPane;
public
class
Caracteranumero {
public
static
void
main(String[] args) {
String texto=JOptionPane.showInputDialog(
"Introduce un caracter ASCII"
);
char
caracter=texto.charAt(
0
);
int
codigo=(
int
)caracter;
System.out.println(codigo);
}
}