Computers and Technology

Modify songVerse to play "The Name Game", by replacing (Name)" with userName but without the first letter. Ex: If userName = "Katie" and songVerse = "Banana-fana fo-f(Name)!", the program prints: Banana-fana fo-fatie! Ex If userName "Katie and songVerse = "Fee fi mo-m(Name)", the program prints: Fee fi mo-matie Note: You may assume songVerse will always contain the substring "(Name)".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); // Remove first character songVerse = scnr. nextLine(); // Modify songVerse to replace (Name) with userName without first character /* Your solution goes here */ System. out. println(songVerse); } }

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 17:00, taytay1828
What are the 12 colors of the spectrum called?
Answers: 1
image
Computers and Technology, 24.06.2019 07:50, treytonmesser
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u. s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
image
Computers and Technology, 25.06.2019 09:30, milagritomiracle
Collaborative devices are applications that allow the users to work together even when they are in different locations true or false
Answers: 1
image
Computers and Technology, 25.06.2019 10:30, jahnoibenjamin
Which of the following if statements uses a boolean condition to test: "if the item is on sale, you can buy it"? a: if( onsale < = "yes" ): b: if( onsale > = "yes" ): c: if( onsale == "yes" ): d: if( onsale ! = "yes" ):
Answers: 2
Do you know the correct answer?
Modify songVerse to play "The Name Game", by replacing (Name)" with userName but without the first l...

Questions in other subjects: