In this example, let’s see how to convert string to integer using radix 27.
Source Code
package com.beginner.examples;
public class StringToInteger {
public static void main(String[] args) {
//Create String Object.
String str = "123456";
/*
* By using Integer.parseInt() method
* and passing radix value as 27,
* convert string to integer value.
*/
Integer integer = Integer.parseInt(str,27);
System.out.println("Integer value is : " + integer);
}
}
Output:
Integer value is : 15473895