Question: Username Generator using java Write a program that asks a user for their first and last name (separately). The program then generates a username using
Username Generator using java
Write a program that asks a user for their first and last name (separately). The program then generates a username using the first letter of their first name, the first three letters of their last name and a random number between 100 and 999.
Note: Use the charAt and substring methods from the String class to construct the letter part of the user name.
Use the Random class to generate a number within the range.
A sample of the output is shown below:
Enter your first name: Sterling
Enter your last name: Archer
Username: SArc591
Tip: Assume that the user has a first and last name that is at least 3 letters long. Ticket Number Validation A ticket company is responsible for selling tickets for airlines, tours and other travel
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
