Question: split is not working in java?
Answer: In java, string. split(".") does not work for splitting a string with dot (e.g., www.xyzws.com) and will give you an array with zero element. The Sting split(String regex) method wants a regular expression as its parameter. ... You got an array with zero element because "." mataches any charachers in your string.