I have a line like test.test.test ... ". Test", and I need to access the last "test" word on that line. Please note that the number of "tests" per line is unlimited. if java had a method similar to php function explode, everything was correct, but .... I think splitting from the end of the line can solve my problem. Is there a way to specify the direction for the method split? I know that one solution for this problem could be the following:
String parts[] = fileName.split(".");
but I think this is a bad decision.
source
share