/ Published in: Java
URL: http://forum.java.sun.com/thread.jspa?threadID=586718&messageID=3024348
Expand |
Embed | Plain Text
try { // yourString ain't 10.6, that's for sure }
Comments
Subscribe to comments
You need to login to post a comment.

Regex would probably be a better option here:
return yourString!=null && yourString.matches("\d{1-5}");The above would return true for an input between 0 and 65535. Of course the regex used can be more realistic to take formatting and decimals into consideration.