Well, I have been programming in Java for most of the three years, and I consider myself very experienced. However, while looking at the Java SE source code, I came across something that I did not expect:
in class Double :
public static final double MIN_NORMAL = 0x1.0p-1022;
I did not expect this and cannot understand what this means. If you do not know, I mean p and p , which are after these numbers, before the subtraction operator. I know that you can use suffixes to make the number be Double , long , float , etc., but I never met p or p . I checked the Java API , but it does not mention it. Is there a complete list of Java literal modifiers somewhere? Does anyone know them all?
For reference, the following are the ones I used or met, with those whose goals elude me in bold with question marks ( # represents any arbitrary number within the appropriate range):
suffixes:
# = 32-bit int#L = 64-bit integer long#L = another 64-bit integer l ?#f = 32-bit float#f = another 32-bit float ?#d = 64-bit Double Float#d = another 64-bit floating point Double ?#e# = scientific notation#e# = other scientific notation#p =?#p =?- More?
Prefixes:
0b# = binary (base 2) literal0b# = another binary (base 2) literal?0# = octal (base 8) literal# = decimal (base 10) literal0x# = hexadecimal (base 16) literal0x# = another hexadecimal (base 16) literal?- More?
Other ( do suffixes or prefixes exist for them? ):
(byte)# = 8-bit byte integer(short)# = 16-bit integer short(char)# - 32-bit char character
source share