What will be the value of x 10 after the following code has been executed? What
ID: 3925542 • Letter: W
Question
What will be the value of x 10 after the following code has been executed? What will be the results of the following code? All the values in the array are initialized to 10 0 All the values, except the first, are set to 10 0 An error will occur when the program runs. There will be a compilation error If numbers is a two-dimensional array, which of the following would give the length of row numbers [r]. length numbers [r].length[r] numbers, length [r] numbers, length What is the value of scores [2][13] in the following array? When a method's return type is a class, what is actually returned to the calling program? An object of that class A reference to an object of that class Only the values in the object that the method accessed Nothing, the return type is strictly for documentation in this situationExplanation / Answer
1)
Answer is c ie 180.
As already the values are predefined in the question explanation is not required.
2)
Answer is D ie there will be a compile time error.
Because the float data type defined is not a valid type required is double, and also in the second line there is an error in the declaration of the expression.
3)
Answer is D ie numbers.length.
ArrayName.length is the predefined method used for getting the length of a 2D array.
4)
------
5)
Answer is B (A reference to an object of the class) ie returning Objects from Methods.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.