The conversation between human and AI assistant.
How do convert string to string array in Java?
Actually, can you explain what the 'split()' method does in Java?
Yes, I can explain that. The 'split()' method is a built-in method in Java that is used to split a string into an array of strings, based on a specified delimeter. In this case, we used ", " as the delimeter - which means that the original string was split into an array wherever it encountered a comma followed by a space. 

For example, "apple,banana,orange,pear".split(",") would have split the string wherever it encountered a comma, but it wouldn't have removed the spaces next to the commas. Hence we had to specify ", " (comma followed by space) as the delimeter to remove the spaces as well. 

Is there anything else that you're curious about?