aspose file tools
The moose likes Beginning Java and the fly likes Function Overloading Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Function Overloading" Watch "Function Overloading" New topic
Author

Function Overloading

binayakumar patel
Greenhorn

Joined: Jun 26, 2009
Posts: 27
I have doubt in function overloading
Here is an example:

public class A{
public int calculate(int I, int j){}
public String calculate(String s, String s1){}
}

Class B extends A{
public float calculate(float a, float b){}
}

It is clear that in class A the method calculate() is overloaded. In same way when B is inheriting class A the calculate() methods also get inherited to class B . Can we say that calculate() of class A is overloaded in class B ??
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 283

binayakumar patel wrote:when B is inheriting class A the calculate() methods also get inherited to class B


Yes you can say its overloading


-Chiru
praveen macherla
Greenhorn

Joined: Jan 26, 2010
Posts: 2
Yes we can say it is overloaded.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32694
    
    4
Welcome to JavaRanch praveen macherla
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Function Overloading
 
Similar Threads
Overriding doubt ?
Overloading and Overriding?
Overload methods in subclass?
Overloading in Subclasses
overriding / overloading