Error in Method overloading
In this chapter you will learn:
Error in Method overloading
params is not part of the signature.
class Math{//from jav a 2s.c o m
static void sum(int[] anArray){
}
static void sum(params int[] anArray){
}
}
Compile-time error
return type is not part of the signature
The return type is not part of the signature.
class Math{// j ava2 s . c o m
int add(int i, int j){
return i+j;
}
float add(int i, int j){
return (float)(i+j);
}
}
Compile-time error.
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Class