I\'m porting a small snippet of PHP code to java right now, and I was relying on the function is_numeric($x) to determine if $x is a number or not. Th
is_numeric($x)
$x
Have you looked into using StringUtils library? There's a isNumeric() function which might be what you're looking for. (Note that "" would be evaluated to true)