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 the string and stringbuffer classes?
Difference between new operator and class.forname().newinstance()?
What is RMI and what are the services in RMI?
Why do I get a duplicate name error when loading a jar file?
Are enterprise beans allowed to use thread.sleep()?
What is the relationship between an event-listener interface and an event-adapter class?
Why won’t the jvm terminate when I close all the application windows?
What is the difference between the session.update() method and the session.lock() method?
If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?
What is the difference between system.out ,system.err and system.in?
Which are the different segments of memory?
What are the different types of exception?
Why are some of the class and element names counter-intuitive?
What is the immediate superclass of the applet class?
Difference between loadclass and class.forname?