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!!);
| |||
![]() 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!!); |
| ||||
jajajajjajajaja ![]() ![]() ![]() que chistoso! jejejejjejjeje te pasaste..... have funnnnnn ![]()
__________________ Curso de Angular JS - Haremos una app de principio a fin |