Please explain your answer Assume that you have the followin
Please explain your answer
Assume that you have the following Bag object, myBag, with n String data: Baglnterface myBag = new ArrayBag(); Write Java statements that create a newBag object which contains non-duplicate data in myBag. Example: if myBag contains data: \"hello\", \"Hello\", \"world\", \"hello\", \"james\", \"james\" newBag object should contain: \"hello\", \"Hello\", \"world\", \"james\"Solution
public class abc { public static void main(String[] args) throws Exception{ Scanner c = new Scanner(new File(\"ac.txt\")); ArrayList