Skip to content

Instantly share code, notes, and snippets.

@sonAndrew
Created March 11, 2020 16:05
Show Gist options
  • Select an option

  • Save sonAndrew/28807ffc1e5993b9d4b7faf272551b80 to your computer and use it in GitHub Desktop.

Select an option

Save sonAndrew/28807ffc1e5993b9d4b7faf272551b80 to your computer and use it in GitHub Desktop.
This method is used to get user name.
public static String getUserName(Scanner borrowedInput)
{
// LOCAL VARIABLES
String localUserName = "";
// FIRST NAME
System.out.println("\nWhat is your first name?");
localUserName = borrowedInput.nextLine();
return localUserName;
} // END - getUserName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment