The output of below program:
public class TestClass { public static void main(final String[] args){ String token = \"null\\n\"; token.tr
Strings are immutable. Change
token.trim();
to
token = token.trim();
Since String is immutable
String
doesn't change the underlying value, it returns a new String without the leading and ending whitespace characters. You need to replace your reference