xplorer87
08-07-2006, 19:40
ciao ragazzi, ho il seguente problema: ho un array di char che vorrei convertire in stringa. uno pensa: eh, mo' ti frego io, c'e' il metodo toString che mi restituira' la stringa corrispondente a tutti i char attaccati in ordine di quell'array.
si, ma manco pe gnente: ecco cosa mi dice la documentazione su questo metodo:
String java.lang.Object.toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns:
a string representation of the object.
:muro: quindi? cosa devo fare per convertire questo simpaticissimo array in una stringa leggibile, non in una spazzatura di codici esadecimali? grazie a tutti ^^ :stordita:
si, ma manco pe gnente: ecco cosa mi dice la documentazione su questo metodo:
String java.lang.Object.toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns:
a string representation of the object.
:muro: quindi? cosa devo fare per convertire questo simpaticissimo array in una stringa leggibile, non in una spazzatura di codici esadecimali? grazie a tutti ^^ :stordita: