0
Project questions 3
Please help my coding String rev=""; for(char i:arr) rev = i+ rev; System .out println(rev); }
3 Answers
+ 1
Print rev only once in the end (after the loop)
What is arr?
+ 1
public class Program
{
public static void main(String[] args) {
String rev = "";
char[] arr = {'a', 'b', 'c'};
for (char i:arr){
rev = Character.toString(i) + rev;
}
System.out.println(rev);
}
}
0
Arr means array ..