changing a format from int to String in Java?
Hi, very new to Java.
Background of problem is that I have a hash table which I am trying to access by building a unique key field from a string and a counter. So Say the String = "1234" and the counter = 9 the unique field would be "12349", but I cant figure out how to change a int to a String and tack it on the end. Can someone help please. Please see the code below to see how far i have got:
void addIdTogether(int start,int finish){
int Total=0;
for(int i = start; i<finish;i++){
//i get an error 'Cannot invoke toString() on the primitive type int' on the next line
Total=Total+Timeseries.this.
getId("123456"+i.toString());
}}
|