Hello,
How to convert String into primitive datatype.also give me a program where you clearly define the primitive datatypes. Please reply my post if you know the answer.
Thanks
Convert Strings In Java - Post ID 79605
This is done by the compiler. I would suggest a google search would return plenty of leads but you can simply look in your textbook. Do your own homework. You will not regret it. 
Or was your very first post only to spam the site with your links?

Or was your very first post only to spam the site with your links?
CoffeeCup... Yeah, they are the best!
Gracey smith wrote:
Hello,
How to convert String into primitive datatype.also give me a program where you clearly define the primitive datatypes. Please reply my post if you know the answer.
Thanks
Hello,
How to convert String into primitive datatype.also give me a program where you clearly define the primitive datatypes. Please reply my post if you know the answer.
Thanks
using parseInt() method for example
//String to primitive types
int iVal = Integer.parseInt(str);
long lVal = Long.parseLong(str);
float fVal = Float.parseFloat(str);
double dVal = Double.parseDouble(str);
Tom, by the answer, I think you might be right.
Web Design: https://www.websnoogie.com
Member - BBB: Websnoogie, LLC
Member - BBB: Websnoogie, LLC
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.