QuestionsCategory: Programmingwhy we can't achieve Runtime Polymorphism with data member
mmSahil Bajaj Staff asked 7 years ago
1 Answers
mmSahil Bajaj Staff answered 7 years ago

Dynamic resolution of fields would make things run a little slower, and there’s really no reason to need it, since you can make fields private and access them with method, which are dynamically resolved. So fields are resolved at compile time instead.