String to float in Java

//String to float
class Convertion
{
public static void main(String[] args) {
String str = "569";
float val = Float.parseFloat(str);
System.out.println("float value:"+val);
}
}


Output:
float value:569.0