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
How to determine SGA site?
What are JTA/JTS and how they used by client?
What is a sessionfactory? Is it a thread-safe object?
Where we can write Rmi registry in the code, without having to write it at the command prompt?
What are the call back methods in entity bean?
What are the different class loaders used by jvm?
Are enterprise beans allowed to use thread.sleep()?
Which javutil classes and interfaces support event handling?
What are the different approaches to represent an inheritance hierarchy?
Brief description about local interfaces?
Which component handles cluster communication in jboss?
difference between ejb,struts,hibernate,spring and jsp
What is ioc concept?
Explain about RMI Architecture?
Is it possible to stop the execution of a method before completion in a sessionbean?