What
are your reasons, Alain?
(I
see, two reasons but I wouldn't put either of them as a general
rule.)
If you
want to use the variable just locally, why not allow to use the
whole
ArrayList functionality?
If you
want to pass it in an List argument, you just pass it as
ArrayList.
I
found it being much better coding habit to have the variable of the
same
type
as the value (if possible). And I'm sure there are more
"theory-founded"
reasonings for that.
r.
-----Original Message-----
From: Alain Ravet [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 5:48 AM
To: [EMAIL PROTECTED]
Subject: [Eap-features] introduce variable : encourage use of interfaceWhen using "Introduce Variable" on.new ArrayList ();you getArrayList arrayList = new ArrayList ();Most of the time, though, you should use.List arrayList = new ArrayList ();"Introduce Variable" should allow the user to choose it's target type.Alain Ravet
