how to identify if a number is of float or double type in java

How 19.5 is a double value. Why we need to append F to it to make it float? Just want to know how we identify a number whether it is float or double.