Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: There's Only One Way To Do It

by hardburn (Abbot)
on Apr 07, 2004 at 13:13 UTC ( [id://343268]=note: print w/replies, xml ) Need Help??


in reply to Re: There's Only One Way To Do It
in thread There's Only One Way To Do It

here are the ways to convert this types, from a convertion class that we have created:

What's wrong with java.lang.Double.parseDouble()?

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated

Replies are listed 'Best First'.
Re: Re: Re: There's Only One Way To Do It
by gmpassos (Priest) on Apr 07, 2004 at 19:11 UTC
    The point is not "java.lang.Double.parseDouble()", is all the different ways to do that and USE that:
    Double.parseDouble(i) ; Double.toString(i) ; (double)i ;
    Soo, for each basic type in Java we nee to use a class or object of a super type to can convert one type to other. And depending of the level of the origin type to the destiny type we can't use a static method of a class, we need to use type casting.

    Note that for each one we nee to catch exceptions. Is just not a simple thing2thing() call! And type convertion shouldn't be an issue, since this a language thing, not a algorithm stuf.

    Graciliano M. P.
    "Creativity is the expression of the liberty".

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://343268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-18 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found