Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program call FancyMyName which asks you to write a program that tests and using the different methods for working with Strings. This program

image text in transcribed
Write a program call FancyMyName which asks you to write a program that tests and using the different methods for working with Strings. This program will ask the user to enter their first name and their last name, separated by a space Read the user's response using Scanner. Separate the input string up into two strings, one containing the first name and one containing the last name. Hint: You can accomplish this by using the indexOfO. Find the position of the space, and then using substring0 to extract eachof the two names. Also output the number of characters in each name, initials. The initials are the first letter of the first name together with the first letter of the last name A sample run of the program should look something like this: Please enter your first name and last name, separated by a space? Khadija Ashraf Sample Output: You entered the name: Khadija Ashraf Your first name is Khadija: has 7 characters Your last name is Ashraf: has 6 characters Your initials are: KA

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

Step: 3

blur-text-image

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

=+90 percent of all oil refineries) into several smaller companies

Answered: 1 week ago