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...
1 Odpowiedź
+ 1
try
String a = Arrays.toString(arr);
result:
"[0,1,2,3,4,5]"