QuestionsCategory: Programmingwhy we can't achieve Runtime Polymorphism with data member
mmSahil Bajaj Staff asked 5 years ago
1 Answers
mmSahil Bajaj Staff answered 5 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.