K
Knute Johnson
I saw some code go by today that was;
Writer fw = new FileWriter(--- // since ... confuses some people
I know we had a discussion the other day about;
List list = new ArrayList();
and why you would do that. I'm curious as to how many people would do
the above with FileWriter, BufferedOutputStream, or FileOutputStream.
And why would you not;
Collection c = new ArrayList();
The other question I had is what do you call that? Is it a cast? A
sort of implicit cast across assignment? Is it mentioned in the JLS
someplace?
I'm not trying to get anyone's knickers in a twist with this, I'm just
curious, so please don't take it for anything more than that.
Thanks,
Writer fw = new FileWriter(--- // since ... confuses some people
I know we had a discussion the other day about;
List list = new ArrayList();
and why you would do that. I'm curious as to how many people would do
the above with FileWriter, BufferedOutputStream, or FileOutputStream.
And why would you not;
Collection c = new ArrayList();
The other question I had is what do you call that? Is it a cast? A
sort of implicit cast across assignment? Is it mentioned in the JLS
someplace?
I'm not trying to get anyone's knickers in a twist with this, I'm just
curious, so please don't take it for anything more than that.
Thanks,