Question: Please answer accordingly. All Java related requestions. I need the answers ASAP MAC190 Final (35 pts) 19. A class instance creation expression contains: (1 point)
MAC190 Final (35 pts) 19. A class instance creation expression contains: (1 point) a) Parentheses b) The new keyword c) The name of the class d) All of the above. 20. Suppose listitem is an object of the class ArrayList String>. How do you add the string "Hello" to the end of listltem? (2 points) 21. Write code which does the following: (4 points) 1) Define and invoke the constructor for a HashSet variable named colors, to hold strings 2) add "red" and "blue" colors to the set 3) output (true or false) if the set contains the color "blue 4) remove the color "blue" from the set. Bonus question: 22. (4 points) Write a program that computes 1/10+2/9+3/8++10/1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
