Skip to content

Commit 5b1ba3f

Browse files
committed
convert string to float
1 parent 42b47c6 commit 5b1ba3f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

string-to-float.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class stringtofloat
2+
{
3+
public static void main(String args[])
4+
{
5+
String s="23.6";
6+
float f=Float.parseFloat("23.6");
7+
System.out.println(f);
8+
}
9+
}

0 commit comments

Comments
 (0)