How can we use them in our codes, and what will cause NaN(not a number)?
You can use them as any other number:
e.g:
float min = Float.NEGATIVE_INFINITY; float max = Float.POSITIVE_INFINITY; float nan = Float.NaN;