LongAccumulator floatValue() method in Java with Examples
The java.LongAccumulator.floatValue() is an inbuilt method in java that returns the current value as a float after a widening primitive conversion.
public float floatValue()
Parameters: This method does not accepts any parameter.
Return Value: The method returns the current value as a float after a widening primitive conversion.
Below programs illustrate the above method:
the old value is: 52 the current value is: 52
the old value is: 19 the current value is: 19
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.