What is the result? Given the code fragment: What is the result? Given the code fragment: What is the result? A. 5 : 5 B. 10 : 10 C. 5 : 10 D. Compilation fails. Explanation: Show Hint ← Previous question Next question →
Snr DingDong Answer is B. count is a static variable. There is only one copy of a static variable a class. So if “count” is changed by one object of that class. It also changes for all other objects of that class. Reply ramanes Thanks for your explanation. Reply
B is the correct answer
Answer is B.
count is a static variable.
There is only one copy of a static variable a class. So if “count” is changed by one object of that class. It also changes for all other objects of that class.
Thanks for your explanation.
B
10:10