what is Static binding?

Answers were Sorted based on User's Feedback



what is Static binding?..

Answer / saumyaranjandash

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

what is Static binding?..

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

Post New Answer

More Advanced Java Interview Questions

Can you give me a simple example of using the requiredif validator rule?

0 Answers  


What method is invoked to cause an object to begin executing as a separate thread?

0 Answers  


Where can I ask questions and make suggestions about seam?

0 Answers  


How many layers are there in RMI and what are they?

1 Answers  


How to get an image from db2 database plz help as soon as possible

1 Answers  






Will the general public have access to the infobus apis?

0 Answers  


Difference between loadclass and class.forname?

0 Answers  


What are Benefits of Connection Pooling?

2 Answers  


Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


what is difference between checked exception & unchecked exception in java?

3 Answers   Ness Technologies,


what is activation monitor and what is its job?

1 Answers  


Wt is the main difference between Java and Java J2EE and Advanced java?

5 Answers   Wipro,


Categories