Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Java Code Tests Question Don T Send Questions Answers Send Java Code Testlistjava Su Q35572943

Write a java code that tests all the question don’t send thequestions answers send java code TestList.java

Suppose that list1 is a list that contains the strings red,yellow, and green, andthat list2 is another list that contains thestrings red, yellow, and blue. Answer the following questions bytesting below in your own java code. Submit TestList.java

a. What are list1 and list2 after executinglist1.addAll(list2)?

b. What are list1 and list2 after executinglist1.add(list2)?

c. What are list1 and list2 after executinglist1.removeAll(list2)?

d. What are list1 and list2 after executinglist1.remove(list2)?

e. What are list1 and list2 after executinglist1.retainAll(list2)?

f. What is list1 after executing list1.clear()?

Leave a Reply

Your email address will not be published. Required fields are marked *