Re: Sheck this simple programm
From: Joona I Palaste (palaste_at_cc.helsinki.fi)
Date: 07/14/04
- Next message: ak: "Serialization"
- Previous message: Joona I Palaste: "Re: Send Credentials to IIS (webservice)"
- In reply to: Fahd Shariff: "Re: Sheck this simple programm"
- Next in thread: Roedy Green: "Re: Sheck this simple programm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Jul 2004 09:21:42 GMT
Fahd Shariff <fahdshariff@yahoo.com> scribbled the following:
> one possible solution: System.out.println(((double)10/(double)13));
It's enough to cast *one* of the operands to double. But take care not
to do this:
System.out.println((double)(10/13));
This will still output 0, as 10/13 is 0, and no casting into anything
will change it.
-- /-- Joona Palaste (palaste@cc.helsinki.fi) ------------- Finland --------\ \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/ "Hasta la Vista, Abie!" - Bart Simpson
- Next message: ak: "Serialization"
- Previous message: Joona I Palaste: "Re: Send Credentials to IIS (webservice)"
- In reply to: Fahd Shariff: "Re: Sheck this simple programm"
- Next in thread: Roedy Green: "Re: Sheck this simple programm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|