Pessoal tenho o seguinte código:
public static void main(String[] args) {
// TODO code application logic here
String teste,str = null;
StringBuffer strBuffer = new StringBuffer();
teste= JOptionPane.showInputDialog("Digite o Comando");
char[] chars = str.toCharArray();
for(int i=0; i < chars.length; i++ ){
strBuffer.append(Integer.toHexString((int) chars[i]));
}
teste = strBuffer.toString();
String Mostra = String.format("O Comando digitado em Hexa é:", teste);
JOptionPane.showMessageDialog(null, teste);
}
}
Quero que pegue o valor que joguei na variável teste jogar dentro de char[]
Sei que é nessa linha que jogo o valor de um no outro:StringBuffer strBuffer = new StringBuffer();
Como faço isso? Para depois apresentar um Jopiton.