I have writen the following code but for some reason all the numbers seem to be offset by 48?
String bdString; Vector<Integer> v = new Vector<Integer>(); BigDecimal bd = new BigDecimal(Math.pow(2, 1000)); bdString = bd.toString(); for (int i = 0; i < bdString.length(); i++) { v.add((Integer.valueOf(bdString.charAt(i)).intValue())); }
When I check the vector all 0's have been entered in as 48, all 1's have been entered in as 49, 2's as 50 etc. I know I'm going to feel like a fool when somebody points it out but... What is going on?