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

difference. between List and Set?

2 Answers   Campus Interaction, HCL, Infotech,


Define prototype?

0 Answers  


does j2ee means advanced java

10 Answers  


whats is mean by connectionpooling

2 Answers   SolutionNET,


What event results from the clicking of a button?

0 Answers  






Different between Struts and Spring? or Why use Spring, if you are already using Struts?

3 Answers   HP,


Can constructors be synchronized in java?

0 Answers  


Do you think that java should have had pointers?

0 Answers  


To identify IDL language what mapping mechanism is used?

0 Answers  


What is ripple effect?

0 Answers  


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

0 Answers  


i have a 1000 objects in data base i need to display those in jsp's how can i retrive those objects in jsp. (consider the performance issue)

2 Answers  


Categories