Can abstract classes have static methods (Java)?

Can abstract classes have static methods (Java)?
A. Yes, always
B. Yes, but depends on code
C. No, never
D. No, static members can’t have different values
 
Answer: a
Explanation: There is no restriction on declaring static methods. The only condition is that the virtual functions must have some definition in the program.
 

Tìm kiếm

Back
Top