Question
Beginner in JAVA programming class, looking for the code on how to make the below instruction work (thumbs up always left for working code!): Task
Beginner in JAVA programming class, looking for the code on how to make the below instruction work (thumbs up always left for working code!):
Task #2: Using the Scanner Classfor User Input1.Add an importstatement above the class declaration to make the Scannerclass available to your program.2.In the mainmethod, create a Scannerobject and connect it to the System.inobject.3.Prompt the user to enter hisor her first name.4.Read the name from the keyboard using the nextLinemethod, and store it into a variable called firstName(you will need to declare any variables you use).5.Prompt the user to enter hisor her last name.6.Read the name from the keyboardand store it in a variable called lastName.7.Concatenate the firstNameand lastNamewith 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started