Ask Question
Today, 01:48

When a field is declared static, there will be:

A. a copy of the field in each class object

B. only one copy of the field in memory

C. a copy of the field for each static method in the class

D. only two copies of the field in memory

+1
Answers (1)
  1. Today, 02:54
    0
    B. only one copy of the field in memory

    Explanation:

    A static method is sort of a description of a class but is not part of the objects that it generates. Crucial: A program may perform a static method without constructing an object first! All other functions (those not static) only occur when they're member of an object. Thus it is necessary to build an object before they could be executed.

    Therefore, when an static field is declared static, there will be:

    B. only one copy of the field in memory
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “When a field is declared static, there will be: A. a copy of the field in each class object B. only one copy of the field in memory C. a ...” in 📘 Chemistry if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers