This page is best viewed with JavaScript enabled.
Montly Contest Winners
This page is best viewed with JavaScript enabled.

Go Back   The Gnomon Workshop Forums > Tutorials Discussions, Tips and Guidance > General Chat / Q+A


General Chat / Q+A Post your questions regarding Subscription, tutorials, etc.

Reply
 
Thread Tools Display Modes
Old 03-08-2009   #1
Gracey
Junior Member
 
Join Date: Mar 2009
Posts: 1
Default Convert the Strings in Java?

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 In Advance
__________________
[url=http://www.embroideryplanet.co.uk]Embroidered Logos[/url]
[url=http://www.embroideryplanet.co.uk]T-Shirt Printing [/url]
[url=http://www.visa-india.co.uk]Indian Tourist Visa [/url]
Gracey is offline   Reply With Quote
Old 03-30-2009   #2
Webby Alisha
Junior Member
 
Join Date: Mar 2009
Posts: 1
Default

Quote:
Originally Posted by Gracey View Post
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 In Advance
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);
__________________
[url=http://www.only333.co.uk/] Website Design [/url]
[url=http://www.only333.co.uk/] Web Designing company london [/url]
[url=http://www.team-it.au.com/] IT Global Management Melbourne[/url]
[url=http://www.team-it.au.com/] IT Management Melbourne[/url]
Webby Alisha is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump


All times are GMT -7. The time now is 16:46 PM.

 
Forums Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2000-2013 The Gnomon Workshop, Inc. - All Rights Reserved. No part of this website may be reproduced without written permission.