Question: Which declarations, when inserted at (1), will result in the program compiling and printing 90 at runtime? Select the two correct answers. (a) Object[] nums
Which declarations, when inserted at (1), will result in the program compiling and printing 90 at runtime?
![public class RQ400A10 { public static void main (String [] args) {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1706/9/4/0/75065bdd94e70e031706940747317.jpg)
Select the two correct answers.
(a) Object[] nums = {20, 30, 40};
(b) Number[] nums = {20, 30, 40};
(c) Integer[] nums = {20, 30, 40};
(d) int[] nums = {20, 30, 40};
(e) None of the above
public class RQ400A10 { public static void main (String [] args) { // (1) INSERT DECLARATION HERE int sum= 0; for (int i sum += i; System.out.println (sum); } } nums).
Step by Step Solution
3.42 Rating (158 Votes )
There are 3 Steps involved in it
c and d The element type of the array nums ... View full answer
Get step-by-step solutions from verified subject matter experts
