Question: I am working in Java with the following problem: Modify secondVerse to play The Name Game (a.k.a. The Banana Song, see Wikipedia.org), by replacing (Name)

I am working in Java with the following problem:

Modify secondVerse to play "The Name Game" (a.k.a. "The Banana Song", see Wikipedia.org), by replacing "(Name)" with userName but without the first letter. Ex: if userName = "Katie", the program prints:

Banana-fana fo-fatie! 

I keep getting an error can I get some help with the code? The given elements are below:

Given information

import java.util.Scanner;

public class NameSong { public static void main (String [] args) { String secondVerse = "Banana-fana fo-f(Name)!"; String userName = "Katie";

userName = userName.substring(1); // Removes first char from userName

/* Your solution goes here */

System.out.println(secondVerse);

return;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!