Dear Experts,
How I can convert int in to String?
I have following code
int j = 0;
j = wdContext.currentContextElement().getFromUserIDForRoleAssignment();
int k = 0;
k = wdContext.currentContextElement().getToUserIDForRoleAssignment();
int l = 0;
l = j + l;
if (thisUser.getUniqueID().equals(j) {
}The above code is failing as thisUser.getUniqueID().equals(j) is incorrect syntacially. I have to convert j into string.
Regards,
Gary
Request clarification before answering.
Converting int to String is straightforward, however are sure you actually need to? The Unique user id isn't normally an integer value, i.e. it normally has a datasource prefix etc. Therefore even if you convert J in you example code to a String I don't believe the strings will ever match.
To convert int to String you can use either of the following static methods.
String.valueOf(int)
Integer.toString(int)
regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.