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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -