Teaching Girl to Learn Java (37): Static Binding and Dynamic Binding

Hello, I am the second silent king, (currently) the top ten blog expert in CSDN Week. This is the thirty-seventh article of the "Teaching Girls to Learn Java" column. Today we will talk about static binding and dynamic binding in Java-what is the difference between them?

The code in this column has been included in  GitHub  github.com/itwanger  , and there are also interview questions I prepared carefully for you.

The third sister has started school and learned computer software programming. Her school is very close to my home, and it is only 10 stops away by bus. She will come to me every weekend and ask me to help her learn Java. As a programmer with more than ten years of programming experience, coupled with the blood relationship given to us by our parents, I feel obligated.

"Second brother, what we are going to learn today is'static binding and dynamic binding', right?" It seems that the third sister has previewed the homework I left for her last time.

"Yes, Sanmei. Static binding means that the type of the object is determined at the compilation stage." I answered her with an unpretentious smile, "Dynamic binding means that the type of the object is not determined until runtime. "

----The dividing line of the Eight Classics of Zhenger, the beginning of the text ------------

1) Every variable has a type.

int data = 10

Guess you like

Origin blog.csdn.net/qing_gee/article/details/108734799