View Single Post
Old 06-12-2002, 04:22 PM   #11 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
overloading is simple.. in java for example:

Code:
public void GiveMeVal(int x)
{
    system.out.println("x is an int equal to:" + x);
}

public void GiveMeVal(String s)
{
   system.out.println("s is a string equal to:" + s);
}
so there are TWO "methods" with the same name (GiveMeVal) but have a DIFFERENT parameter list (int x and String s).

So if we call: GiveMeVal(10); we will get "x is an int equal to: 10"
and if we call...: GiveMeVal("ten"); we get "s is a string equal to: ten"

easy!!
__________________
-- bloomberg.
abc123 is offline   Reply With Quote