what is Static binding?

Answer Posted / vikneswaran

static binding is nothing but in case of method overloading
its also called compiletime polymorphizm
method overloading is a class have more than one methods
with same name and different signature .diff singnature
means diff no of arguments & diff datatype of arguments &
diffsequence of arguments .
for example:
public class sample
{
public class method()
{
System.out.println("with out argumrnts
methods:");
}
public class method(int a, String b)
{
System.out.println("diff datatype of
arguments");
}
public class method(String a,int b)//diff sequence
of arguments
{
System.out.println("diff sequence of
arguments:");
}
public class method(int a,String b,String c)
{
System.out.println("diff data and diff no
of arguments");
}

public static void main(String args[])
{
sample s= new sample();
s.method();
s.method(2,"vikki");
s.method(5,"new",12);
}

}


JVm knows which method call during compile time

Is This Answer Correct ?    17 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between java class and bean?

578


What is synchronization and why is it important?

542


What state does a thread enter when it terminates its processing?

600


How primary key is implemented in Oracle?

1915


If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?

567






Whats new with the stop(), suspend() and resume() methods in jdk 1.2?

581


Are we allowed to change the transaction isolation property in middle of a transaction?

563


what is a non-repeatable read?

1826


What is the purpose of the finally clause of a try-catch-finally statement?

555


What is the difference between the ‘font’ and ‘fontmetrics’ class?

635


What must a class do to implement an interface?

583


Brief description about local interfaces?

627


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

568


What is a session? Can you share a session object between different theads?

554


Difference between hashmap and hashtable?

605