Re: New File with a Directory



Mark,
Thank you. If I replace

File file = new File(infile.getName());

with

File file = new File(infile.getPath());

in the "methodWithNew" method, then it works.

So, I guess the bottom line is that I can just set a File object
to the input File object, without needing to use the "new" operator.

When I do that (no "new"), am I just making the new File object in
the method point to the input File object? This sounds OK to me.

Thanks, Alan
.