Question: Element Removal Given the Lists instruments and stringed instruments, remove all of the languages found in stringed instruments from instruments. Then, print instruments to the
Element Removal
Given the Lists instruments and stringed instruments, remove all of the languages found in stringed instruments from instruments. Then, print instruments to 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;
stringedInstruments.addGuitar;
stringedInstruments.addViolin;
stringedInstruments.addCello;
stringedInstruments.addDoubleBass;
stringedInstruments.addViola;
DO NOT CHANGE THE CODE ABOVE THIS LINE
WRITE YOUR CODE HERE
STDOUT
Expected STDOUT
Nonstringedinstruments:DrumsFluteSaxophone
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
