what is Static binding?

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


Please Help Members By Posting Answers For Below Questions

What restrictions are placed on the values of each case of a switch statement?

537


what is an isolation level?

2216


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

574


Are there books about seam?

634


Are we allowed to change the transaction isolation property in middle of a transaction?

567






Can I map more than one table in a cmp?

592


What are externizable interface?

586


Can I use multiple html form elements with the same name?

581


What is a tasks priority and how is it used in scheduling?

550


What you mean by COM and DCOM?

619


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1638


Describe, in general, how java's garbage collector works?

540


Is the ternary operator written x : y ? Z or x ? Y : z ?

639


Name three component subclasses that support painting?

618


Name three subclasses of the component class?

616