Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Please: k * * stringReformat takes a person's name in the format and t reformats it to the form Preconditions: the string is

In Java Please:

image text in transcribed

k * * stringReformat takes a person's name in the format and t reformats it to the form Preconditions: the string is not empty there is exactly one',(comma) and it comes at the end of the Last name there is 1 space after the comma there is exactly one space between the First name and the Initial The Initial is a single character followed by a '." * Here are some examples (using"informally): k
 k Alex P Keaton"  public static String stringReformat( String name) String theAnswer"this is not the answer" // example code starts here: delete or comment out when you have completed the function String subExamplename.substring(1,5); // some example code char theChar-name . charAt (4); Stdout.println(" stringReformat demol. the substring (1,5) is: ubExample); if ( theChar = ', ' ) Stdout.println(" stringReformat demo2. the character in position 4 is a comma") else Stdout.println(" stringReformat demo2. the character in position 4 is NOT a comma, it is: "+ theChar); // end of example code return theAnswer / TODO 3: fix this

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

Students also viewed these Databases questions

Question

b. What is the banks return on equity? LOP8

Answered: 1 week ago

Question

LO14.1 Describe the characteristics of oligopoly.

Answered: 1 week ago