Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/11/2006, 16:10
Beavis
 
Fecha de Ingreso: octubre-2006
Mensajes: 6
Antigüedad: 17 años, 7 meses
Puntos: 0
De acuerdo IsNumeric function java???

public static boolean IsNumeric(String s){


for(int i=0;i<s.length();i++){
if(s.charAt(i) < '0' || s.charAt(i)> '9' ){
return false;
}
}
return true;

}


then all you have to do is...


if(IsNumeric)num=Integer.parseInt(String s);
else System.out.println("This is not a number Man!!);