I would like to add one more point to it.
STATIC variable are not associated to any particular instance/object of a class. Hence you modify the variable with Parent Class reference or Child Class reference, the same copy gets modified.
Hence apart from understanding Public Static as Global, Please understand it as not associated to any particular instance, hence with any class hierarchy reference you update a static variable , same memory location gets updated.
--
Vinod
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…