I'm working on some anroid studio projects. I have a problem.
I have a stack named result_stack. -> result_stack = [K, T, E, J, O, S, O, G, O, J]
I tried to convert this stack in to string -> String final_result = String.valueOf(result_stack);
Now when I try to print final_result -> System.out.println(final_result);
-> it prints [K, T, E, J, O, S, O, G, O, J]
But I want to get rid of all commas, square brackets and spaces. I mean, I want to print it like this "KTEJOSOGOJ" and then I'll set this as a textview.
I tried this but nothing has changed:
final_result.replaceAll(",", "");
System.out.println(final_result);
I still get [K, T, E, J, O, S, O, G, O, J] as output. Please help me with this.