¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita0
How memory is allocated for these static variables?
1 Respuesta
0
suppose you create two objects a and b.
student a,b=new student();
if age is a data member of class student and declared as static the value of age remains same for both objects a and b