Hi everyone,
How does one convert the following

a string to integer
a integer to string
a string to float
a float to string
a string to long
a long to string
a string to double
a double to string

I am trying to do a mini calculator.

If someone knows the conversion way to the above question please show or e-mail me the codings of how to do this conversions correctly.

My e-mail is freesoft_2000@yahoo.com

Thank You

Yours Sincerely

Richard West

These are basic concepts that you should have know by now ... anywayz ...

string to integer
Integer.parseInt("string");

integer to string
String s = "" + integer;

Rest do it yourself ... I have given you the basic ideas.... others are same as above.

for an integer to string you can also use
String s = String.valueOf(intNum);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.