Question: i need double check and see the correct answer Question 1 Answer saved Marked out of 1.00 Which of the following statements is valid? Select
i need double check and see the correct answer



![d[] = new double[30]; c. int i = new int(30); d. char[]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f67bab8aee6_54766f67bab2942d.jpg)
![c = new char[4]{'a', 'b', 'c', 'd'}; Question 2 Answer saved Marked](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f67bac39782_54766f67babc6bd0.jpg)




Question 1 Answer saved Marked out of 1.00 Which of the following statements is valid? Select one: a, int i = {3, 4, 3, 2}; b. double d[] = new double[30]; c. int i = new int(30); d. char[] c = new char[4]{'a', 'b', 'c', 'd'}; Question 2 Answer saved Marked out of 1.00 p Flag question Which of the following loops prints "Welcome to Java" 10 times? Select one: a. for (int count = 10; count 0) [ System.out.println( message) n- 1 Choose valid statement for calling nPrinti) method? Select one: a. nPrint("Covid1910): b. nPrint(Covid19,10) c. Printo, d. Print Covid 19 10); Question 15 Answer saved Marked out of 1.00 F Flag question Given the following method implementation public static void callFunc(int p, String o [ while (p>0) System.out.println(a): } 3 What is the final value of k after invoking callFunc() method? int k-2; String I = "EXAM"; callFunck). Select one a. 2 b.3 c1 d.0 Question 16 Answer saved Marked out of 1.00 Flag question Analyze the following code: public class Test [ public static void main(String args[]) int[] x-new int[31: System.out.println("x[O] is ".x[01: ) ) Select one O a. The program has a runtime error because the array element [0] is not defined. b. The program has a runtime error because the array elements are not initialized. c. The program has a compile error because the size of the array was not specified when declaring the array. d. The program runs fine and displays x[0] is 0. Question 17 Answer saved Marked out of 1.00 p Flag question Analyze the following code: if(x=100)&&(10) System.out.println('x is between 10 and 100); Select one! a. The statement compiles tine but has a runtime error. b. The statement has compiled errors because (x-100) & IX > 10) must be enclosed inside parentheses. c. The statement has compile errors because (x10) must be enclosed inside parentheses and the printin...) statement must be put inside a block O a. The statement compiles fine. Question 13 Answer saved Marked out of 1.00 v Flag question Analyze the following program fragment of code using Java: intx double d-1.5; switch (d) case 10:X-1; case 1.5: X-2; case 2.0:X-3; Select one: a. The program has a compile error because the required default case is missing in the switch statement b. No errors c. The program has a compile error because the required break statement is missing in the switch statement d. The switch control variable cannot be double Question 14 Answer saved Marked out of 1.00 Flag question How many times does the display statement is executed? for (int i-0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
