This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

binding of variables.  RSS feed

 
Manish Agarwal
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Java.This is my first question in this forum.

My question is that we always talk of static and dynamic binding of methods only.Why don't we hav static and dynamic binding of variables?plz help.
 
Tybon Wu
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you meant dynamic type binding for variables then no Java does not support it. Java variable type is statically bound during the variable declaration. Dynamic type binding is supported on other languages such as Lisp, where variable type is bound when it is assigned a value.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!