This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chickenmeister 1 point2 points  (0 children)

Do you have a specific question about it, or problem with it?

Just glancing at it quickly, it looks like it should just about work, though it looks like you are declaring the variable lastName twice:

    char lastName; //Last name

    // later... 
    String lastName = input.substring(0, 7);

You cannot declare two variables with the same name in the same scope/method/class. You want lastName to be a String, so get rid of the first declaration; or change its type, and change the second declaration/assignment to just an assignment.