Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is mean by method signature?

Answers were Sorted based on User's Feedback



what is mean by method signature?..

Answer / chandmanik20@gmail.com

method signature means:-
1. Name of method.
2. Type of arguments.
3. Number of arguments.
4. Order of arguments.

Is This Answer Correct ?    7 Yes 0 No

what is mean by method signature?..

Answer / neha rajpal

Method signature means method name and parameter list and also
order of the parameter these three define's the mathod
signature

Is This Answer Correct ?    3 Yes 1 No

what is mean by method signature?..

Answer / p.nandakishore

It consists of method name and type of the parameters

void sum(int a,int b){}

sum(int,int) is the method signature

In a class we cannot have two methods with the same method
signature

Is This Answer Correct ?    2 Yes 0 No

what is mean by method signature?..

Answer / ravi

any one tell the answer

Is This Answer Correct ?    1 Yes 2 No

what is mean by method signature?..

Answer / vikneswarank

method signature means defind the method in diff signature
diff no arguments
diff datatype if arguments
diff sequence of arguments
for example

public class PolyOverload1
{
public int iEmpNo;
protected double dbSalary;
private boolean boolPermanent;
String strEmpName;

public PolyOverload1()
{
System.out.println("PolyOverload constructor");
iEmpNo = 1001;
strEmpName = "Base Employee";
dbSalary = 20000.500;
}

public void getEmpDetails()
{
// to print the employee details
System.out.println("Emp no : " + iEmpNo);
System.out.println("Emp name : " + strEmpName);
}

//no of arguments difference
public void getEmpDetails(int eno)
{
//to print the employee details
System.out.println("Emp no [getEmpDetails(int eno)]
: " + eno);
System.out.println("Emp name [getEmpDetails(int
eno)] : " + strEmpName);
}

//different type of data type
//note : return type can be different for overloading
public int getEmpDetails(String ename)
{
// to print the employee details
System.out.println("Emp no [getEmpDetails(String
ename)] : " + iEmpNo);
System.out.println("Emp name [getEmpDetails(String
ename)] : " + ename);
return iEmpNo;
}

//no of arguments difference
public void getEmpDetails(int eno, String ename)
{
// to print the employee details
System.out.println("Emp no [getEmpDetails(int eno,
String ename)] : " + eno);
System.out.println("Emp name [getEmpDetails(int eno,
String ename)] : " + ename);
}

//different seguence type of data type
public void getEmpDetails(String ename, int eno)
{
// to print the employee details
System.out.println("Emp no [getEmpDetails(String
ename, String eno)] : " + eno);
System.out.println("Emp name [getEmpDetails(String
ename, String eno)] : " + ename);
}

public static void main (String arg[])
{
//Object creation
PolyOverload1 polyObj = new PolyOverload1();
//static binding or early binding...during compile
time JVM will find that the method's reference to call
polyObj.getEmpDetails();
polyObj.getEmpDetails(1002);
polyObj.getEmpDetails("Test Employee1");
polyObj.getEmpDetails(1003, "Test Employee2");
polyObj.getEmpDetails("Test Employee3", 1004);
}
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.

0 Answers   Rolta,


What is a ternary operator in java? What is an interface?

0 Answers  


Is multiple inheritance allowed in Java? Why ?

7 Answers  


If there is no implementation of MARKER INTERFACE in java. Then how compiler come to know about specification.

2 Answers  


What is static synchronization?

0 Answers  


What method is used to specify a container's layout in java programming?

0 Answers  


how to create constants in java?

0 Answers  


What technique is carried out to find out if a particular string is empty?

0 Answers  


What is meant by class and object in java?

0 Answers  


What is the difference between jvm and jre? What is an interface?

0 Answers  


what are upcasting and downcasting?

5 Answers  


What class is used to create Server side object?

1 Answers   TCS,


Categories