The point is that if i feed it a name with a first and last name, it should find the space and return everything after the space... but i keep getting an error Dr. Java. Am i using charAt correctly?
If somebody could help me with this it would be kindly noted. Thank you!
here is the code:
public static String getLastName(String author)
{int space =author.charAt(" ");String lastName=author.substring(space+1);return lastName;}
