Read a number with commas and decimal dots not using "builtin" support
Was intended as a joke, but should actually work for very large numbers because it only looks at the digits one by one. It uses some knowledge about digit character code points (48..58) O:)

int carry = 0;
boolean dot = false;
for (int i = 0; i &lt; text.length(); i++) {
  char c = text.charAt(i);
  if (c &gt;= '0' &amp;&amp; c &lt;= '9') {
    System.out.print((char) (c / 2 + 24 + carry))
    carry = (c &amp; 1) * 5;
  } else {
    System.out.print(c);
    dot |= c == '.';
  }
}
if (carry != 0) {
  System.out.print(dot ? "5" : ".5");
}


More reasonable (one could do the division inline here, too) -- and no library calls at all (except for printing the result).

double result = 0;
double decimal = 0;
for (int i = 0; i &lt; text.length(); i++) {
  char c = text.charAt(i);
  if (c &gt;= '0' &amp;&amp; c &lt;= '9') {
    if (decimal != 0) {
      result += (c - '0') * decimal;
      decimal /= 10;
    } else {
      result = result * 10 + (c - '0');
    }
  } else if (c == '.') {
    decimal = 0.1;
  }
}
System.out.println(result / 2);