Yeah, that's my experience. You might need it if you are building
paths for display or whatever. There might be some other weird
conditions where you might need it (edit or building existing paths).
But for something simple like new File("./path/file"); I can't see why
you would need the File.separator
On Dec 30, 3:30 am, phil swenson <[email protected]> wrote:
> I find code that uses the "File.separator" field irritating. It makes
> the code uglier and best I can tell "/" works everywhere, including
> windows. Does anyone know if there is a reason to use File.separator
> instead of just "/"? My guess is unless you are writing java code
> that writes to a .bat file or something along those lines, "/" is
> fine. Right?
--
You received this message because you are subscribed to the Google Groups "The
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/javaposse?hl=en.