Ask Question
29 July, 18:46

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

+1
Answers (1)
  1. 29 July, 22:10
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers