String str= "1"; int a = Integer.parseInt(str); System.out.println(a); BigDecimal bigDecimal = new BigDecimal(a);