📅  最后修改于: 2022-03-11 14:52:37.789000             🧑  作者: Mango
class scalerAcademy {
public static void main ( String args [] ) {
String str = "789"; // creating a string
Integer ans = Integer.valueOf(str); // passing the value to an Integer class
Integer ans1 = Integer.valueOf(str,16); // passing radix value as int
System.out.println(ans); //outputs 789
System.out.println(ans1); // outputs 1929
}
}