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
Difference between loadclass and class.forname?
What are the benefits of detached objects?
Can I run seam with jdk 1.4 and earlier?
Name the eight primitive java types.
What is an abstract method?
What is chat area? Explain.
Write a program to show synchronization?
how i secure my site with the https protocol.what are the steps?
Why a client should be multithreading? Explain.
What restrictions are placed on the location of a package statement within a source code file?
which book is better for jdbc ,servlets and jsp
What’s jboss jbpm?
Which are the different segments of memory?
Are we allowed to change the transaction isolation property in middle of a transaction?
Why does the option tag render selected=selected instead of just selected?