I am really confused about dynamic binding and static binding. I have read that determining the type of an object at compile time is called static binding and determining it
For non-static functions, you use static binding whenever the function is non-virtual, i.e. the final keyword is applied to it and/or the function is private. final implies the function cannot be changed and the private keyword implies it only has class scope. Otherwise, dynamic binding is used.
For static functions, static binding is always used. If a type A is passed in, it will run A's method, regardless of where A references.