Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A static field is created by placing: A) the key word static after the field nam

ID: 3843558 • Letter: A

Question

A static field is created by placing: A) the key word static after the field name B) the key word static after the access specifier and before the field's data type C) the key word static after the access specifier and field s data type D) it in a static field block Static methods can only operate on ___ fields. A) instance B) static C) global D) local The only limitation that static methods have is: A) they can refer to only non-static members of the class B) they can only be called from static members of the class C) they must be declared as public methods D) they cannot refer to non-static members of the class When a reference variable is passed as an argument to a method: A) a copy of the variable's value is passed into the method's parameter B) the method has access to the object that the variable references C) the method becomes a static method D) the program will terminate In Java, it is possible to write a method that will return: A) a whole number B) a string of characters C) a reference to an object D) All of the above When a method's return type is a class, what is actually returned to the A) An object of that class B) A reference to an object of that class C) Only the values in the object that the method accessed D) Nothing, the return type is strictly for documentation in this situation. An object's ___ is simply the data that is stored in the object's fields at A) value B) assessment C)record D) state

Explanation / Answer

1. b) after access specifier and data type .

eg public static int num

2. b) static - static method works with static only.

3. D) they can only refer static not non static

4. B) method has access to object reference..

5. D) all of the above

6. B) a reference to an object of a class

7) D) state or value is data which is stored

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote