View Single Post
Old 30-10-2009, 18:19   #2
banryu79
Senior Member
 
L'Avatar di banryu79
 
Iscritto dal: Oct 2007
Città: Padova
Messaggi: 4131
Una possibile soluzione potrebbe essere questa:
Codice:
// data la String s, stampa il valore esadecimale di ogni carattere di cui e' composta
private void printHex(String s) {
        char[] chars = s.toCharArray();
        for (char c : chars) {
            String hex = Integer.toHexString((int)c);
            System.out.println(hex);
        }
    }
__________________

As long as you are basically literate in programming, you should be able to express any logical relationship you understand.
If you don’t understand a logical relationship, you can use the attempt to program it as a means to learn about it.
(Chris Crawford)
banryu79 è offline   Rispondi citando il messaggio o parte di esso