Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
5 2 8 0 4 0 . 3 4 8 9 5 2 8 . 9 3 z q y 7 Jump to level 1
Jump to level Strings batch batch and batch are read from input. Each string represents a list of animals surrounded by and Assign combinedAnimals with the concatenation of batch batch and batch in the order read. Assign allTheltems with a string that contains all the animals in batch batch and batch in the order read, separated by and surrounded by and Ex: If the input is: tortoise kangaroo bird then the output is: All batches in one line: tortoisekangaroobird One batch of all animals: tortoisekangaroobird import java.util.Scanner; public class JoinMultiplefields public static void mainString args Scanner scnr new Scanner System.in; String batch; String batch; String batch; String combinedAnimals; String allTheItems; batch scnr nextline; batch scnr nextline; batch scnr nextline; your code goes here
Jump to level
Strings batch batch and batch are read from input. Each string represents a list of animals surrounded by and
Assign combinedAnimals with the concatenation of batch batch and batch in the order read.
Assign allTheltems with a string that contains all the animals in batch batch and batch in the order read, separated by and surrounded by and
Ex: If the input is:
tortoise
kangaroo
bird
then the output is:
All batches in one line: tortoisekangaroobird
One batch of all animals: tortoisekangaroobird
import java.util.Scanner;
public class JoinMultiplefields
public static void mainString args
Scanner scnr new Scanner
System.in;
String batch;
String batch;
String batch;
String combinedAnimals;
String allTheItems;
batch scnr nextline;
batch scnr nextline;
batch scnr nextline;
your code goes here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started