This method is used to get the primitive data type of a certain String. parseXxx() is a static method and can have one argument or two.
Syntax:static int parseInt(String s)
static int parseInt(String s, int radix)
Example:public class Test{
public static void main(String args[]){
int x =Integer.parseInt("9");
double c = Double.parseDouble("5");
int b = Integer.parseInt("444",16);
System.out.println(x);
System.out.println(c);
System.out.println(b);
}
}
Output:
9
5.0
1092
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 645 / 159198215. Delta: 0.03244 с