string a int java
String number = "1"
int num = Integer.parseInt (name);
//num equals 1
string a int java
String number = "1"
int num = Integer.parseInt (name);
//num equals 1
java convert string to int and compare
Collections.sort(data, new Comparator<TXCartData>() {
@Override
public int compare(TXCartData lhs, TXCartData rhs) {
int n1=Integer.parseInt(lhs.rowId);
int n2=Integer.parseInt(rhs.rowId);
if (n1>=n2){
return 1;
}
return -1;
}
});
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