Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to convert string type to int type and vice versa
How to convert string type to int type and vice versa
1 how to convert String into integer int?

A. there are two methods:

1).int I = integer . parse int([String]); or

i = Integer.parseInt([String],[int radix]);

2).int i = Integer.valueOf(my_str)。 int value();

2 how to convert integer int into string?

A. there are three ways:

1.)String s = String . value of(I);

2.)String s = integer . tostring(I);

3.) String s = ""+i;