Question: Element Removal Given the Lists instruments and stringedlnstruments, remove all of the languages found in stringedInstruments from instruments. Then, the console. ` ` ` import
Element Removal
Given the Lists instruments and stringedlnstruments, remove all of the languages found in stringedInstruments from instruments. Then, the console.
import java.io;
import java.util.;
public class CodingQuestion
public static void mainString args
List instruments new ArrayList;
instruments.addGuitar;
instruments.addDrums;
instruments.addFlute;
instruments.addViolin;
instruments.addSaxophone;
instruments.addCello;
List stringedInstruments new ArrayList;
stringedlnstruments.addGuitar;
stringedInstruments.addViolin;
stringedlnstruments.addCello;
stringedlnstruments.addDoubleBass;
stringedlnstruments.addViola;
DO NOT CHANGE THE CODE ABOVE THIS LINE
WRITE YOUR CODE HERE
instruments.removeAllstringedlnstruments;
System.out.printlninstruments;
STDOUT
Expected STDOUT
Nonstringed instruments: Drums Flute, Saxophone
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
