Rick Tasche wrote:Please note I have absolutely no control over the fact that the numbers I am working on are Doubles, and can not change them.
How do I preform boolean ( > < == != ) operations on doubles ?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Rick Tasche wrote:I'm sorry, but anything from that site is unreadable ( to me ).
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:you would need to use d1.equals(d2) or !d3.equals(d4).
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Rick Tasche wrote:I'm sorry, but anything from that site is unreadable ( to me ).
Then you're in for a long and unhappy life as a programmer.
If it's just the font size (which I have to admit bugs my old eyes) use the Zoom on your browser; but you really do need to get used to reading the API docs.
Otherwise you'll get a lot of RTFM answers to your questions.
Winston
Wendy Gibbons wrote:I'm with Rick, I was progamming java about 2 years before the api documentation made much sense to me.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Rick Tasche wrote:10 years programming experience in - other languages - .
Java by far has the worse syntax of anything I have ever been forced to use, the documentation included.
How would one "box" a double boolean ?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Rick Tasche wrote:Java by far has the worse syntax of anything I have ever been forced to use, the documentation included.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Stephan van Hulst wrote:And of course half of them don't work consistently for different environments. Especially bad with C because when I needed help I always stumbled on forums full of unreadable *nix techie lingo.
Java's huge standard library was a deep breath of fresh air.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:But the Java documentation is better, even if only because you don’t have to use an IDE to find it...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Campbell Ritchie wrote:But the Java documentation is better, even if only because you don’t have to use an IDE to find it...
Sheesh. Chalk another "duh" up for GOGW (good old Gates-ware).
Matthew Brown wrote:
Winston Gutkowski wrote:Sheesh. Chalk another "duh" up for GOGW (good old Gates-ware).
I'm not sure that's fair. I use C# most of the time at the moment, and I get at the documentation via MSDN, not via Visual Studio. (And, it has to be said, Visual Studio is a damn good IDE).
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:
Wendy Gibbons wrote:I'm with Rick, I was progamming java about 2 years before the api documentation made much sense to me.
Maybe it's my background coming from languages that didn't have it then; but I find the API docs (and Javadoc in general) absolutely wonderful.
Winston
Rick Tasche wrote:
How would one "box" a double boolean ?
Winston Gutkowski wrote:
Matthew Brown wrote:
Winston Gutkowski wrote:Sheesh. Chalk another "duh" up for GOGW (good old Gates-ware).
I'm not sure that's fair. I use C# most of the time at the moment, and I get at the documentation via MSDN, not via Visual Studio. (And, it has to be said, Visual Studio is a damn good IDE).
Yes, but Eclipse is free, and covers everything that VS does and more (as do a lot of freeware/shareware products). Hopefully, MS will get hoisted by their own petard, like IBM did, when people realize that there are more flexible (and better) products out there.
But that's an argument for a different time (and thread ).
Winston
java DoubleDemo
d1 > d2: false
d1 >= d2: true
d1 < d2: false
d1 <= d2: true
d1 == d2: false
d1 != d2: true
Campbell Ritchie wrote:You will get problems with == and != because the values are probably not unboxed before those tests.[code=java]Double d1 = 1.23;
Henry Wong wrote:I have to agree with Matthew --- Visual Studio is definitely a damn good IDE !!
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
10 years programming experience in - other languages - .
Java by far has the worse syntax of anything I have ever been forced to use, the documentation included.
Jeff Verdegan wrote:That's why I vote for the explicit unboxing to literals, even if it's not necessary...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here