Question: Strings batch 1 , batch 2 , and batch 3 are read from input. Each string consists of three colors, separated by +
Strings batch batch and batch are read from input. Each string consists of three colors, separated by and surrounded by
and Assign secondltems with the second color from each string, separated by
Ex: If the input is:
yellowsienna
brickindigo
orangeteal
then the output is:
yellowbrickorange
import java.util.scanner;
public class JoinMultipleseconds
public static void mainString args
Scanner scnr new Scanner
System.in;
String batch;
String batch;
String batch;
String secondOfBatch;
String secondOfBatch;
String secondOfBatch;
String secondItems;
batch scnrnextLine;
batch scnrnextLine;
batch scnrnextLine;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
