i’ve one text file, and im doing something like this :
resultingTokens = currentLine.split("\\t");
file data is tab delimited. But when I parse it with above code, it does not give expected output. I realize that tab is actually editor specific. But how does Java (above code) interprets it?
you are trying to split on
\t(literally backslash followed by lower case T) because you’re escaping the backslash. a single backslash with a t will represent a tab.is what will give you the result you were expecting.