• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Double.Nan

 
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello JavaRanchers
I 've Always Been Very Much confused In NaN's Special Properties Like Nan Is Not Equal To Anything Including Itself.
Plz Tell Me Some Other Properties Of It.
Besides Tell Me A Very Good Practice Resource Or Mock Tests For Garbage Collection,Thread And Inner Classes.
Thanx Very Much
#######################################################################
Agrah
 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(previous incorrect reply deleted - ed)

1. Math.sqrt() method call for a negative number or NaN returns NaN
2. NaN in these wrapper classes is not equal to anything, even to itself.
3. It is a static final field in the wrapper classes.

Divison by zero on float or double returns the fields POSITIVE_INFINITY or NEGATIVE_INFINITY (DUH!)
[ September 18, 2005: Message edited by: Barry Gaunt ]
 
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as GC is concerned represent all objects & their refereces pictorially then it will be easy to solve those questions. Dan's mocks are good for GC.
[ September 19, 2005: Message edited by: Srinivasa Raghavan ]
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dan's Mocks
 
My, my, aren't you a big fella. Here, have a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic