Question: 21. A static method can _____________. (Select all that apply) a. call only other static methods of the same class directly b. manipulate only static
21. A static method can _____________. (Select all that apply)
a. call only other static methods of the same class directly
b. manipulate only static fields in the same class directly
c. be called using the class name and a dot(.)
22. Which of the following promotions of primitive types is not allowed?
a. char to int
b. double to float
c. int to double
d. short to long
23. Which of the following statements describes block scope?
a. It begins at the opening { of the class declaration and terminates at the closing }.
b. It limits label scope to only the method in which it is declared.
c. It begins at the identifiers declaration and ends at the terminating right brace(}).
d. It is valid for one statement only.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
