GIAC
GSSP-JAVA · Question #72
Mark works as a Programmer for InfoTech Inc. He develops a program that defines a class named Inventory that has an instance variable named NumOfItems. Which of the following properties will be…
The correct answer is B. It will be visible in Static methods if it passed as a parameter. C. It will be available for all the instance methods of the class. D. It becomes available for garbage collection if it is no longer in scope. See the full explanation below for the reasoning.
Question
Mark works as a Programmer for InfoTech Inc. He develops a program that defines a class named Inventory that has an instance variable named NumOfItems. Which of the following properties will be applied by NumOfItems? Each correct answer represents a complete solution. Choose all that apply.
Options
- AIt will not be visible in Static methods if it passed as a parameter.
- BIt will be visible in Static methods if it passed as a parameter.
- CIt will be available for all the instance methods of the class.
- DIt becomes available for garbage collection if it is no longer in scope.
How the community answered
(30 responses)- A17% (5)
- B83% (25)
Community Discussion
No community discussion yet for this question.