Possible Duplicate:
How do I split a string with any whitespace chars as delimiters?
I need to split full name so I return just the surname.
For example F. J. Hill (we assume that last name is always after first name or after initials)
so this is what i got so far
public String getLastName(){ String surname; surname = FullName.split; } but this doesn't work. Can i get some help please ? Dont really understand how split string works
String#splitmethod. It just requires a google search.()) after a method name to call it. The last line of your method should besurname = FullName.split([parameters]);. And don't forget to return a value!