How to convert String into primitive datatype.

Answer Posted / akshya kumar

using the wrapper classes, by using the function in
following way:

int i_var = Integer.parseInt(string_var); //and as in
answer #2

Integer, Float, Long are wrapper classes predefined in JAVA
with methods parseInt(), parseFloat etc respectively.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which software is used for java programming?

642


How to use string tokenizer class.

713


What is JFC?

802


Is java type safe?

614


How are this() and super() used with constructors in java programming?

664






What does java edition mean?

624


What 5 doubled?

614


Can a list be null in java?

645


What is an escape character in java?

636


When do I need to use reflection feature in java?

715


What is java oops?

656


What is java used for on a computer?

611


What are format specifiers in java?

706


What is the importance of hashcode() and equals() methods?

674


What does s mean in regex?

632