The longValue method is used to transform this Float object to primitive type long. This is basically the core functionality of this method. As we all know a float data type can have decimal digits, what will happen to that if we convert it into long. For example if we have the following expression:
Float value = new Float(12.75f);
. Upon conversion to long, the float value decimal digit will get truncated. Due to data type narrowing, the returned value will be 12.