0

How to store all loop data in an array out side of the for loop in java ?

for(int I=0; I<a.length(); I++) { arr[I]= Integer.toString[I] } String a = arr[I]; this is wrong code, but I want to pring the array of this for loop into a string as a= "ab","ef","jk","we". like that... is it possible to do so...

5th Jan 2018, 12:13 PM
Krishanu Debnath
Krishanu Debnath - avatar
1 Antwort
+ 1
try String a = Arrays.toString(arr); result: "[0,1,2,3,4,5]"
5th Jan 2018, 3:31 PM
michal