Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to convert String into primitive datatype.

Answer Posted / vikki

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);

Is This Answer Correct ?    32 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the SimpleTimeZone class?

2207


whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net

2058


Is java a utf 8 string?

929


What is a literal coding?

961


What is immutable state?

939


Who is the owner of java?

950


What is a native method in java programming?

1000


How to create an immutable class?

1032


What is an object in java?

964


What do you understand by synchronization?

984


How many types of the indexof method are there for strings?

920


What are the features of java?

1002


Explain the difference between comparator and comparable in java?

877


Explain the difference between intermediate and terminal operations in java8?

1040


What are the two types of exceptions in java? Which are the differences between them?

1032