r/learnprogramming • u/Temporary-Warthog250 • Apr 05 '22
Name one programming/comp sci concept you never understood and if you understand it, try to explain it to them
Name a programming concept such as virtual functions, pointers, certain algorithms, etc that you always had a hard time understanding and why.
Someone else who reads yours and does understand it, try to explain it to them to help them learn
1.6k
Upvotes
18
u/procrastinatingcoder Apr 05 '22
All dogs are animals, not all animals are dogs. Logically you can go one way, not the other.
More specifically, I'm not sure of what bytecode gets generated for the JVM, but as far as C++ and a few other compiled languages go, what "inherited" classes do is just "copy" the inherited code with their own code right beside it. So you can always refer to something you copied, but you can't generate the missing pieces afterwards.