A very simple question...
I am looking through a piece of code and I cannot figure out what this does. I have seen it in other code but as I am just learning java, I was hoping someone could tell me about it. Here is the code snipet:
line = line.replaceAll("\t", " ");
My question is what does \t do in Java???
Re: A very simple question...
\t is an escape sequence that represents a tab. When a String contains a \t in it, a tab will be shown when that String is displayed in the terminal (however, this does not always work in components).
Re: A very simple question...
Partly related to regular expression, the code is finding any tab indentation and replacing it with a single space...check regular expression and escape sequences for more information regarding the \t