Question: 5 2 8 0 4 0 . 3 4 8 9 5 2 8 . q 3 z q y 7 Jump to level 1

528040.3489528.q3zqy7
Jump to level 1
Strings batch1, batch2, and batch3 are read from input. Each string consists of three foods, separated by "+" and surrounded by "[" and "]". Assign secondSamples with the second food from each string, separated by "+".
Ex: If the input is:
[grape+tea+artichoke]
[rice+berry+lemon]
[milk+peas+bread]
then the output is:
tea+berry+peas
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
String batch1;
String batch2;
string batch3;
String secondOfBatch1;
String secondOfBatch2;
String secondOfBatch3;
String secondSamples;
batch1= scnr.nextLine();
batch2= scnr. nextline();
batch3= scnr. nextLine(
 528040.3489528.q3zqy7 Jump to level 1 Strings batch1, batch2, and batch3 are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!