Converting Char Array to List in Java
Can anyone help me and tell how to convert a char array to a list and vice versa. I am trying to write a program in which users enters a string (e.g "Mike is good" ) and in the output, each whitespace is replaced by "%20" (I.e "Mike%20is%20good" ). Although this can be done in many ways but since insertion and deletion take O(1) time in linked list I thought of trying it with a linked list. I am looking for someway of converting a char array to a list, updating the list and then converting it back. public class apples { public static void main(String args[]) { Scanner input = new Scanner