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
What is the difference between java class and bean?
What is synchronization and why is it important?
What state does a thread enter when it terminates its processing?
How primary key is implemented in Oracle?
If I wanted to use a solarisui for just a jtabbedpane, and the metal ui for everything else, how would I do that?
Whats new with the stop(), suspend() and resume() methods in jdk 1.2?
Are we allowed to change the transaction isolation property in middle of a transaction?
what is a non-repeatable read?
What is the purpose of the finally clause of a try-catch-finally statement?
What is the difference between the ‘font’ and ‘fontmetrics’ class?
What must a class do to implement an interface?
Brief description about local interfaces?
What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?
What is a session? Can you share a session object between different theads?
Difference between hashmap and hashtable?