subject

1. Add an import statement above the class declaration to make the Scanner class available to your program. 2. In the main method, create a Scanner object and connect it to the System. in object.
3. Prompt the user to enter his/her first name.
4. Read the name from the keyboard using the nextLine method, and store it into a variable called firstName (you will need to declare any variables you use).
5. Prompt the user to enter his/her last name.
6. Read the name from the keyboard and store it in a variable called lastName.
7. Concatenate the firstName and lastName with a space between them and store the result in a variable called fullName.
8. Print out the fullName.
9. Compile, debug, and run, using your name as test data.
10. Since we are adding on to the same program, each time we run the program we will get the output from the previous tasks before the output of the current task.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:10
1. declare a constant named cents_per_pound and initialize with 25. 2. get the shipping weight from user input storing the weight into shipweightpounds. 3. using flat_fee_cents and cents_per_pound constants, assign shipcostcents with the cost of shipping a package weighing shipweightpounds.
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Cloud computing service providers manage different computing resources based on the services they offer. which resources do iaas and paas providers not manage? iaas providers do not manage the for the client, whereas paas providers usually do not manage the for their clients. iaas- storage server operating system network paas- applications interafce storage vertualiation
Answers: 2
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Which sentences describe the things you need to ensure while creating a sketch and a drawing? while an artistic or creative drawing is a creative expression, a technical drawing is an informative expression. you need to create accurate and neat drawings to convey accurate information. a technical drawing clearly conveys its meaning or information, and does not leave room for interpretation maintain a good speed while creating drawings
Answers: 1
You know the right answer?
1. Add an import statement above the class declaration to make the Scanner class available to your p...
Questions
question
Mathematics, 10.05.2021 01:00
question
Mathematics, 10.05.2021 01:00
question
English, 10.05.2021 01:00
Questions on the website: 13722361