Just because it works on all OS today doesn't mean it will always be the case.
For example, just over the past few years, two operating systems have emerged with "novel" ways of viewing the file system (Android and iOS). I don't think hardcoding '/' instead of using File.separatorChar is worth the risk. -- Cédric On Wed, Dec 29, 2010 at 9:30 AM, phil swenson <phil.swen...@gmail.com>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 javapo...@googlegroups.com. > To unsubscribe from this group, send email to > javaposse+unsubscr...@googlegroups.com<javaposse%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. > > -- Cédric -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javapo...@googlegroups.com. To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.