I'm having issues understanding ArrayList in Java. I tried to declare a Character ArrayList and add a char at 0, but it returned error at list.add(0, "B") line.
public class ArrListTest {
public static void main(String[] args) {
ArrayList<Character> list;
list.add(0, "B");
}
}
Also I'm having issues reversing a string. Is there a way to reverse a string without using a loop?