Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this java program we are going to work with strings. This will be a fun one I hope. a. Create a class called NameTester.

In this java program we are going to work with strings. This will be a fun one I hope.

a. Create a class called NameTester. (You will not need a class. This will have the main method in it).

b. Import Scanner

c. Create a Scanner object

d. Prompt for your first name.

e. Create a variable for your first and get the user input for your first name.

f. Prompt for your last name.

g. Create a variable for your last name and get the input for your last name.

h. Create a variable for a blank.

i. Create a variable for your full name and assign it your first and last name and a blank using the + operator.

j. Using the variable for your full name, use the substring method (use the table on page 159) as a guide) print out your name with one letter on each line.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions