Float(String s) constructor from Float has the following syntax.
public Float(String s) throws NumberFormatException
In the following code shows how to use Float.Float(String s) constructor.
public class Main { public static void main(String[] args) { Float float3 = new Float("0.2"); System.out.println(float3); } }
The output: