0

In java , why abstract class have static variable even though abstract class cannot be instantiated

In java , abstract class can have static variable. However as we cannot instantiate abstract class then what is use of having it. Thank you in advance for replying

10th Dec 2020, 8:32 PM
Milind Ghag
Milind Ghag - avatar
1 Odpowiedź
+ 2
Abstract class have all the properties as the normal class additionally it has atleast 1 abstract method.. Since it has an object method, then it cannot be instantiated "only until its abstract method(s) have their definations implimented. After that in can be instantiated in the concrete class which is provided implementation for abstract methods and made it fully concrete class..
10th Dec 2020, 9:10 PM
Jayakrishna 🇮🇳