Limited access

Upgrade to access all content for this subject

Which of the following are legitimate reasons for using a static variable instead of a non-static variable in a class?

I.    The variable refers to a constant that can be used in other classes
II.   The variable refers to one value that is the same across all instances of the class it is defined in
III.  The variable refers to an important piece of information unique to each new object created from this class
IV.   The variable refers to a count of the number of times a new object from this class is constructed

I, II, and III only.


I, III, and IV only.


I, II, and IV only.


II and IV only.


III and IV only.

Select an assignment template