Question: MAC190 Final (35 pts) s instance creation expression contains: (1 point) a) Parentheses b) The new keyword c) The name of the class. d) All

 MAC190 Final (35 pts) s instance creation expression contains: (1 point)

MAC190 Final (35 pts) s instance creation expression contains: (1 point) a) Parentheses b) The new keyword c) The name of the class. d) All of the above 21. Suppose listitem is an object of the class ArrayList How do you add the string "Hello" to the end of listitem? (2 points) 22. 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: 23. (5 points) An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example. 371 is an Armstrong number since 3'3'3+ 77'7 + 1'1"1 371. Write a method boolean is Armstrong (int number) which tests the argument specified to see if it's an Armstrong number. Returns True if Armstring and False if not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!