AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

parseDouble?!?!

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian)
View previous topic :: View next topic  
Author Message
gbattine
Guest





PostPosted: Tue May 23, 2006 9:07 am    Post subject: parseDouble?!?! Reply with quote



Returns a new double initialized to the value represented by the
specified String, as performed by the valueOf method of class Double.

Questo è quello che è scritto nella documentazione di java.
Io non capisco però l'effettivo funzionamento. Converte in double un
qualsiasi valore di tipo stringa.
Scusate la mia ignoranza,vuol dire converte per esempio xyz in
double????
Non mi è molto chiaro....
Back to top
Pietro
Guest





PostPosted: Tue May 23, 2006 9:07 am    Post subject: Re: parseDouble?!?! Reply with quote



gbattine ha scritto:
Quote:
Returns a new double initialized to the value represented by the
specified String, as performed by the valueOf method of class Double.

Questo è quello che è scritto nella documentazione di java.
Io non capisco però l'effettivo funzionamento. Converte in double un
qualsiasi valore di tipo stringa.
Scusate la mia ignoranza,vuol dire converte per esempio xyz in
double????
Non mi è molto chiaro....


converte "23,4" in 23,4
Back to top
Manuel T
Guest





PostPosted: Tue May 23, 2006 9:07 am    Post subject: Re: parseDouble?!?! Reply with quote



gbattine ha scritto:
Quote:
Scusate la mia ignoranza,vuol dire converte per esempio xyz in
double????

Avresti anche dovuto leggere che in questo caso lancia un'eccezione,
credo NumberFormatException
Back to top
Manuel T
Guest





PostPosted: Tue May 23, 2006 9:07 am    Post subject: Re: parseDouble?!?! Reply with quote

Manuel T ha scritto:
Quote:
gbattine ha scritto:
Scusate la mia ignoranza,vuol dire converte per esempio xyz in
double????

Avresti anche dovuto leggere che in questo caso lancia un'eccezione,
credo NumberFormatException

Throws:
NumberFormatException - if the string does not contain a parsable
double.
Back to top
gbattine
Guest





PostPosted: Tue May 23, 2006 3:07 pm    Post subject: Re: parseDouble?!?! Reply with quote

Grazie delle spiegazioni...ho ancora un dubbio.
Sapete spiegarmi che si intende per oggetto articolato in java e dove
posso cercarlo nella documentazione della sun?
Cioè mi è stato detto che per memorizzare un file di testo con prima
colonna di tipo stringa e altre colonne di tipo numerico

stringa dato dato dato dato....

potrei creare un oggetto costituito da due array,uno per la parte dei
nomi(stringa) e uno per la parte dei dati (le restanti colonne).
Come si può fare ciò?
Grazie
Back to top
Manuel T
Guest





PostPosted: Wed May 24, 2006 8:08 am    Post subject: Re: parseDouble?!?! Reply with quote

gbattine ha scritto:
Quote:
potrei creare un oggetto costituito da due array,uno per la parte dei
nomi(stringa) e uno per la parte dei dati (le restanti colonne).
Come si può fare ciò?
Grazie

C'è un errore di fondo.

Crea un oggetto che rappresenti la tua entità e che la descriva
interamente. Poi fai un array di questi oggetti.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.