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 the string and stringbuffer classes?

794


Difference between new operator and class.forname().newinstance()?

829


What is RMI and what are the services in RMI?

841


Why do I get a duplicate name error when loading a jar file?

825


Are enterprise beans allowed to use thread.sleep()?

885


What is the relationship between an event-listener interface and an event-adapter class?

777


Why won’t the jvm terminate when I close all the application windows?

982


What is the difference between the session.update() method and the session.lock() method?

756


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

1980


What is the difference between system.out ,system.err and system.in?

824


Which are the different segments of memory?

831


What are the different types of exception?

790


Why are some of the class and element names counter-intuitive?

819


What is the immediate superclass of the applet class?

837


Difference between loadclass and class.forname?

803