Java String Tokens

  • + 0 comments

    can anybody tell me why trim() is required at all? the regex can handle the leading and trailing spaces but still when i am not using trim(), my code fails on a few test cases even after producing the exact same output as required for those cases! kinda confused