I've heard that all Java functions are implicitly virtual, but I'm still not sure if this will run how I want.
Suppose I have a class A, with child B. both A and B have functions called foo(), so B's definition is overriding A's.
Suppose also that A has a function called that takes an instance of A as a parameter:
If I pass in an instance of B to the function, which definition of foo() will it call, A's or B's?