So let's say I have a double which is 1.5, and then I convert it to a string, then try to turn the first character into a string using the char.at method.
double a = 1.5;
String b = String.valueOf(a);
System.out.println(Integer.valueOf(b.charAt(0)));
But when I did that, here's the output I received:
49
What did I do wrong?