integer array to primitive integer conversion
Since i am new to java, so please tell me that is there any way by which i can convert integer array to primitive int?? if yes, give some code.
adil_bashir
Junior Poster in Training
67 posts since Jan 2012
Reputation Points: 3
Solved Threads: 1
DavidKroukamp
Practically a Master Poster
693 posts since Dec 2011
Reputation Points: 282
Solved Threads: 169
What i actually mean is that if at index 0, value stored is 49 and at index 1, the value stored is 50 then can i take it as 4950? can it be done?
adil_bashir
Junior Poster in Training
67 posts since Jan 2012
Reputation Points: 3
Solved Threads: 1
What i actually mean is that if at index 0, value stored is 49 and at index 1, the value stored is 50 then can i take it as 4950? can it be done?
well taking from your last posts maybe this?:
String tmp="";//variable to concatenate integers to string
for(int i=0;i<ret.length;i++){
if(ret[i]!=0) {
System.out.print(ret[i]+",");
tmp+=ret[i];//add integer to previous string value
}
}
DavidKroukamp
Practically a Master Poster
693 posts since Dec 2011
Reputation Points: 282
Solved Threads: 169
adil_bashir
Junior Poster in Training
67 posts since Jan 2012
Reputation Points: 3
Solved Threads: 1