Click to See Complete Forum and Search --> : Stroring value in Java variable


arpit_vavadia
08-22-2008, 08:53 PM
How do I store paths to a praticule file in Java for example
String c = "c:\abc\arp\nn.dat"
It has got "\" slashes which would generate error .
I have to read a file that has all the path to different file and display them in an applet . :confused:

chazzy
08-22-2008, 08:57 PM
when storing, replace the \'s with /'s. this can be done with the replace method. you can also replace the \'s with \\'s, but the first method I would think is better - all modern OS's support it.