No this is wrong: the split method just takes an argument which is the separator that you want to use to split the
String, which comes from the getText() method. Look it up.
As Mr Clapham mentions, it's not generally a great idea to have code invoking a main method. In well-designed code, the main method should be very short and just used as an entrypoint to kick things off. If you're coming from another method, you have already kicked things off and it should be just as easy to replicate the instructions in the main method from whereever you are.