Linking of a procedure call to the code to be executed.
Binding is devided into 2 types:
The binding is done at static time/compilation time is known as static binding.
class student{
private void play(){System.out.println("student is playing...");}
public static void main(String args[]){
Student s1=new Student();
s1.play();
}
}
The binding is done at runtime is called as dynamic binding.
class Student{
void play(){System.out.println("Student is playing...");}
}
class Talent student extends Student{
void play(){System.out.println("Talent student is playing...");}
public static void main(String args[]){
Student p=new Talent student();
p.play();
}
}