what is Static binding?
Answers were Sorted based on User's Feedback
Generally in case of Methodoverloading static binding
occurs,it is otherwise called early binding..here the
arguments of methods will resolve during the compilation
stage...so you will avail those methods code after
compilation state...but where as in overriding it is
happening in runtime...so it is dynamic binding...
Is This Answer Correct ? | 20 Yes | 14 No |
Answer / 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 |
What is the purpose of the notifyall() method?
Connection Pooling with different type of databases?
A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions
what is activation monitor and what is its job?
What is deadlock?
What state does a thread enter when it terminates its processing?
what is DGC?
what is domain,give me some brief information about that?
What is multi-tasking? Types?
What is the difference between system.out ,system.err and system.in?
what is the Remote Stub?
whats is mean by object and class?