I've been doing some pretty typical coding projects for a CS class at school, and one or two of them involve reading files. I'm curious why the filepaths outputted by my Windows 7 machine and read by my Java IDE Eclipse use different facing slashes. For example C:\Users\jhobbie\Desktop\eclipse
gives an error "invalid escape sequence" and I have to go in and switch all the slashes to C:/Users/jhobbie/Desktop/eclipse
. I understand what the error message means, I'm just wondering why Windows would output (and I assume use?) different direction slashes than Java. Is there an alternate way of reading file names other than strings that allows this formatting?
Thanks!