I am wondering if I am going about splitting a string on a . the right way? My code is:
.
String[] fn = filename.split(\".\"); return fn[0];
split takes a regex as argument. So you should pass "\." instead of "." because "." is a metacharacter in regex.
split
"\."
"."