1.What is overloading in java ?
2.What do you know about method signature ?
3.What do you mean by return type in java ?
4.Can we overload method by changing return type?
2.What do you know about method signature ?
3.What do you mean by return type in java ?
4.Can we overload method by changing return type?
void method(String s){}
int method(){return 0;}
5.Can we overload method by changing return type?
Number method(String s){return 0;}
Integer method(){return 0;}
6. What will be the output of below code?
public class callkr {
public callkr(){
System.out.println(" A");
}
void callkr(){
System.out.println(" B");
}
public static void main(String[] args) {
callkr c=new callkr();
c.callkr();
}
}
7.Can we overload constructor ?
8.Create your own System.out.println("callkr");
9.When we get ambiguity while overloading a methods ?
10.What is covariant return type in java ?
No comments:
Post a Comment