I'm trying to split a line of text into multiple parts. Each element of the text is separated by a period. I'm using string.split("."); to split the text into an array of Strings, but not getting anywhere.
Here is a sample of the code:
String fileName = "testing.one.two";
String[] fileNameSplit = fileName.split(".");
System.out.println(fileNameSplit[0]);
The funny thing is, when I try ":" instead of ".", it works? How can I get it to work for a period?