The float class is a wrapper class for the primitive type float which contains several methods to effectively deal with a float value like converting it to a string representation, and vice-versa. An object of the Float class can hold a single float value.
The task is to multiply two Floating point numbers in Java and print their multiplication.
- Initialize two float type numbers.
- Store their multiplication result in a float variable.
- Print that results
The product is: 3.0
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.