Ask Question
8 March, 02:19

Modify songVerse to play "The Name Game" (OxfordDictionaries), by replacing " (Name) " with userName but without the first letter. Ex: If userName

+4
Answers (1)
  1. 8 March, 05:18
    0
    The Java code for the problem is given below.

    Your solution goes here is replaced/modified by the statement in bold font below

    Explanation:

    import java. util. Scanner;

    public class NameSong {

    public static void main (String[] args) {

    Scanner scnr = new Scanner (System. in);

    String userName;

    String songVerse;

    userName = scnr. nextLine ();

    userName = userName. substring (1);

    songVerse = scnr. nextLine ();

    songVerse = songVerse. replace (" (Name) ", userName);

    System. out. println (songVerse);

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Modify songVerse to play "The Name Game" (OxfordDictionaries), by replacing " (Name) " with userName but without the first letter. Ex: If ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers