I have an example code that says the following:
(uno.getText().trim().charAt(0)+"\n"+
dos.getText().trim().charAt(0)+"\n"+
tres.getText().trim().charAt(0)+"\n"+
cuatro.getText().trim().charAt(0));
We did this to show in textarea
the initials of the names that the user entered, but I do not remember how it worked.
I would also need to know what the "\n"+
does, and why trim()
is used