Published in: Java
URL: http://forum.java.sun.com/thread.jspa?threadID=586718&messageID=3024348
try { // yourString ain't 10.6, that's for sure }
Comments
Subscribe to comments
You need to login to post a comment.
Java How to Program
Takes a new tools-based approach to Web application development that uses Netbeans 5.5 and Java Studio Creator 2 to create and consume Web Services. Features new AJAX-enabled, Web applications built with JavaServer Faces (JSF), Java Studio Creator 2 and the Java Blueprints AJAX Components. Includes new topics throughout, such as JDBC 4, SwingWorker for multithreaded GUIs, GroupLayout, Java Desktop Integration Components (JDIC), and much more.
pablazo on 05/23/07
Published in: Java
URL: http://forum.java.sun.com/thread.jspa?threadID=586718&messageID=3024348
try { // yourString ain't 10.6, that's for sure }
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.