Here's a simple little rule.
1. ALL integral literals are of type
int, regardless of their radix (base notation).
Examples:
127 //int literal
456789 //int literal
016 //int literal represented in OCTAL notation
0xFF //int literal represented in HEXADECIMAL notation
0Xffabcd //int literal represented in HEX.
Rule #2:
2. All floating point literals are of type
double, casts not withstanding (ie, yes you can include an F or f or (float) and then it won't be a double but I'm just talking about a plain undecorated floating-point literal value)
examples:
1. //double
.1 //double
0.1 //double
123.456 //Can you guess what this is?
789.12 //boolean.
NO THAT WAS A JOKE. IT'S ALSO A DOUBLE.
Hope this makes it crystal clear