Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Java Wrapper Classes :: Converting String Values Into Double Values

In previous example we discussed how to convert String Values into integer values. Double values and float values are used in floating-point calculations. We can use following methods available in relevant classes.

Syntax : Converting String values into Double values

double d1=Double.parseDouble("89223.4234312454");

Syntax : Converting String values into Float values
float f1=Float.parseFloat("2.32323");

Note : Remember  that the Float is not a keyword. It is a class name.


This post first appeared on Let's Learn Java API, please read the originial post: here

Share the post

Java Wrapper Classes :: Converting String Values Into Double Values

×

Subscribe to Let's Learn Java Api

Get updates delivered right to your inbox!

Thank you for your subscription

×