how to check if number is integer in java
if(x == (int)x){
println("x is an integer");
}
how to check if number is integer in java
if(x == (int)x){
println("x is an integer");
}
determine if is string or int
string str = "3257fg";
for(int i = 0;i < (strlen(str) - 1);i++) {
if((int)str[i] < 10) {
// it is a number, so do some code
} else {
// it is not a number, do something else
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us