what is overloading in java?
Answer Posted / rajesh bonepalli
Overloading in java means creating the methods by same
method signature(name,return type) passing different
arguments/parameters.
Example :
public class Children {
public void getHabits(int k){
System.out.println("overriding in the children with
childrens behaviour int");
}
public void getHabits(){
System.out.println("overriding in the children with
childrens behaviour");
}
public void getHabits(double j){
System.out.println("overriding in the children with
childrens behaviour double");
}
public String getHabits(double j,double i){
System.out.println("overriding in the children with
childrens behaviour double");
return null;
}
}
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
In java, how many ways you can take input from the console?
What is instance example?
What do you mean by formatting?
What does it mean that strings are immutable?
what do you mean by marker interface in java?
What are the advantages of exception handling in java?
Explain oops concepts in detail?
What is the significance of listiterator?
What is length in java?
Explain about map interface in java?
What does g mean in regex?
How to create a custom exception?
How big is a 32 bit integer?
Why is java logo a cup of coffee?
What is numeric data type?