I am wondering why this code works on C# but not on Java?
It gives me an error in split function that it can only take strings
Should I change the separators to String
so it will be like this
String separators = " .,:\t"
char[] separators = { ' ', ',', '.', ':', '\t' }; String[] words; words = value.split(separators); //Value is a string passed inside this function
The program basically takes a name like, "Mr. John Doe" and it will ignore the . and white space