Re: Object constructors

Stefano Corsi <[email protected]> Tue, 25 Mar 2003 08:40:57 +0000
Newsgroups gmane.comp.lang.moto.devel
Organization Moto Project
Message-ID <[email protected]>
> Works no problem since each constructor has a different number of args.
> When I try to declare:
>
> class A{
>   A(String x){
>
>   }
>
>   A(boolean x){
>
>   }
> }
>
> it tells me I am redefining A() since they each have 1 arg. Is there no way
> to define different constructors with the same number of args, but of
> different types? 

Strange. This snipplet works no problem for me.

Stefano