HELP! I need a quick Java term. It's at the tip of my tongue!

SaltBoy

Diamond Member
Aug 13, 2001
8,975
11
81
What's the concept where you can construct an object with different arguments?!

For example, you can create a boolean with two different types of arguments:

Boolean(boolean)
Boolean(string s)

Help!
 

lukatmyshu

Senior member
Aug 22, 2001
483
1
0
It's called Method-Overloading as it applies to any method, not just a constructor. So you can have two methods ---
foo(String s)
foo(Boolean s)
and at compile the correct method is linked (dependending on the arguments static-type).
 

edro

Lifer
Apr 5, 2002
24,326
68
91
Overloading operators?

Edit: Yeah, I think it's Method Overloading... or constructors...
 

SaltBoy

Diamond Member
Aug 13, 2001
8,975
11
81
Originally posted by: lukatmyshu
It's called Method-Overloading as it applies to any method, not just a constructor. So you can have two methods ---
foo(String s)
foo(Boolean s)
and at compile the correct method is linked (dependending on the arguments static-type).
Huh. I swear it was something else. Oh well.

 

Zombie

Platinum Member
Dec 8, 1999
2,359
1
71
can't be polymorphism because he never said anything about inheritance from objects.
 

Jzero

Lifer
Oct 10, 1999
18,834
1
0
I didn't have time to read the rest of the thread, but I'm pretty sure it's overloading.
Sorry if it's already been answered.