java - How to add numbers onto the end of an int variable? -
how 1 update int variable within method input added end of int variable?
if wanted update value of combination after inputting 1, 2, 3, , 4, can variable hold value 1234?
this works,
int = 1; int j = 2; int k = integer.valueof(string.valueof(i) + string.valueof(j)); system.out.println(k);
output 12
Comments
Post a Comment