Westonci.ca is the premier destination for reliable answers to your questions, provided by a community of experts. Join our Q&A platform and connect with professionals ready to provide precise answers to your questions in various areas. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

how many copies of each static variable and each class variable are created when 10 instances of the same class are created

Sagot :

Answer:

Static variables are initialized only once

Explanation:

Only one copy of static variables are created when 10 objects are created of a class

A static variable is common to all instances of a class because it is a class level variable